Browse Source

CLI: remove timeout for offline commands

e.g. when interacting with hw wallets (e.g. signmessage)
it does not make sense to time out

also, str(e) of some exceptions such as TimeoutError is ""...
master
SomberNight 6 years ago
parent
commit
de83ab6d4a
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 6
      run_electrum

6
run_electrum

@ -395,7 +395,7 @@ if __name__ == '__main__':
print_msg("To run this command without a daemon, use --offline") print_msg("To run this command without a daemon, use --offline")
sys_exit(1) sys_exit(1)
except Exception as e: except Exception as e:
print_stderr(e) print_stderr(str(e) or repr(e))
sys_exit(1) sys_exit(1)
else: else:
if cmd.requires_network: if cmd.requires_network:
@ -406,9 +406,9 @@ if __name__ == '__main__':
coro = run_offline_command(config, config_options, plugins) coro = run_offline_command(config, config_options, plugins)
fut = asyncio.run_coroutine_threadsafe(coro, loop) fut = asyncio.run_coroutine_threadsafe(coro, loop)
try: try:
result = fut.result(10) result = fut.result()
except Exception as e: except Exception as e:
print_stderr(e) print_stderr(str(e) or repr(e))
sys_exit(1) sys_exit(1)
if isinstance(result, str): if isinstance(result, str):
print_msg(result) print_msg(result)

Loading…
Cancel
Save