MCPcopy
hub / github.com/RUB-NDS/PRET / do_timeout

Method do_timeout

printer.py:251–261  ·  view source on GitHub ↗

Set connection timeout: timeout

(self, arg, quiet=False)

Source from the content-addressed store, hash-verified

249
250 # ------------------------[ timeout <seconds> ]-----------------------
251 def do_timeout(self, arg, quiet=False):
252 "Set connection timeout: timeout <seconds>"
253 try:
254 if arg:
255 if self.conn:
256 self.conn.timeout(float(arg))
257 self.timeout = float(arg)
258 if not quiet:
259 print(("Device or socket timeout: " + str(self.timeout)))
260 except Exception as e:
261 output().errmsg("Cannot set timeout", e)
262
263 # send mode-specific command with modified timeout
264 def timeoutcmd(self, str_send, timeout, *stuff):

Callers 1

timeoutcmdMethod · 0.95

Calls 3

outputClass · 0.90
timeoutMethod · 0.80
errmsgMethod · 0.80

Tested by

no test coverage detected