MCPcopy Index your code
hub / github.com/RUB-NDS/PRET / do_close

Method do_close

printer.py:242–248  ·  view source on GitHub ↗

Disconnect from device.

(self, *arg)

Source from the content-addressed store, hash-verified

240
241 # ------------------------[ close ]-----------------------------------
242 def do_close(self, *arg):
243 "Disconnect from device."
244 if self.conn:
245 self.conn.close()
246 self.conn = None
247 print("Connection closed.")
248 self.set_prompt()
249
250 # ------------------------[ timeout <seconds> ]-----------------------
251 def do_timeout(self, arg, quiet=False):

Callers 3

do_openMethod · 0.95
do_reconnectMethod · 0.95
reconnectMethod · 0.95

Calls 2

set_promptMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected