1
0

optional wait parameter for interface

This commit is contained in:
ecdsa
2013-03-10 10:24:42 +01:00
parent 49a4c6c92a
commit 837150132d
2 changed files with 11 additions and 11 deletions

View File

@@ -586,6 +586,15 @@ class Interface(threading.Thread):
return out
def start(self, wait=True):
threading.Thread.start(self)
if wait:
# wait until connection is established
self.connect_event.wait()
if not self.is_connected:
print_msg("Not connected, aborting.")
sys.exit(1)
def run(self):
while True:
self.init_interface()