do not call exit() in the interface module

This commit is contained in:
thomasv 2013-03-13 15:26:29 +01:00
parent c3dc2d5284
commit a4f977190e
2 changed files with 8 additions and 4 deletions

View File

@ -241,7 +241,9 @@ if __name__ == '__main__':
if not options.offline:
interface = Interface(config)
interface.start(wait=True)
if not interface.start(wait=True):
print_msg("Not connected, aborting.")
sys.exit(1)
wallet.interface = interface
verifier = WalletVerifier(interface, config)
verifier.start()
@ -359,7 +361,9 @@ if __name__ == '__main__':
if cmd not in offline_commands and not options.offline:
interface = Interface(config)
interface.register_callback('connected', lambda: sys.stderr.write("Connected to " + interface.connection_msg + "\n"))
interface.start()
if not interface.start(wait=True):
print_msg("Not connected, aborting.")
sys.exit(1)
wallet.interface = interface
verifier = WalletVerifier(interface, config)
verifier.start()

View File

@ -595,8 +595,8 @@ class Interface(threading.Thread):
# wait until connection is established
self.connect_event.wait()
if not self.is_connected:
print_msg("Not connected, aborting.")
sys.exit(1)
return False
return True
def run(self):
while True: