Fixed inproper call to time()
This commit is contained in:
parent
565218eed2
commit
6bfb19613c
|
|
@ -190,21 +190,21 @@ class sys_command():
|
||||||
yield output
|
yield output
|
||||||
|
|
||||||
print('[N] Waiting for output to settle (5 sec)')
|
print('[N] Waiting for output to settle (5 sec)')
|
||||||
last = time()
|
last = time.time()
|
||||||
while time()-last < 5:
|
while time.time()-last < 5:
|
||||||
for fileno, event in poller.poll(0.1):
|
for fileno, event in poller.poll(0.1):
|
||||||
try:
|
try:
|
||||||
output = os.read(child_fd, 8192).strip()
|
output = os.read(child_fd, 8192).strip()
|
||||||
trace_log += output
|
trace_log += output
|
||||||
except OSError:
|
except OSError:
|
||||||
last = time() - 60
|
last = time.time() - 60
|
||||||
break
|
break
|
||||||
|
|
||||||
if 'debug' in self.opts and self.opts['debug']:
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
if len(output):
|
if len(output):
|
||||||
print(output)
|
print(output)
|
||||||
|
|
||||||
last = time()
|
last = time.time()
|
||||||
|
|
||||||
if 'debug' in self.opts and self.opts['debug']:
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
print('[N] Exited subsystem, instructing it to shutdown.')
|
print('[N] Exited subsystem, instructing it to shutdown.')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue