mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-04 17:05:31 -05:00
Handle new Tor controller errors in CLI
This commit is contained in:
parent
b8e797049b
commit
ebf13cfa11
@ -58,7 +58,6 @@ class TorErrorUnreadableCookieFile(Exception):
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class NoTor(Exception):
|
||||
"""
|
||||
This exception is raised if onionshare can't find a Tor control port
|
||||
|
@ -155,10 +155,11 @@ def main(cwd=None):
|
||||
app = OnionShare(debug, local_only, stay_open, transparent_torification, stealth)
|
||||
app.choose_port()
|
||||
app.start_onion_service()
|
||||
except onion.NoTor as e:
|
||||
sys.exit(e.args[0])
|
||||
except onion.TorTooOld as e:
|
||||
except (onion.NoTor, onion.TorTooOld, onion.TorErrorInvalidSetting, onion.TorErrorSocketPort, onion.TorErrorSocketFile, onion.TorErrorMissingPassword, onion.TorErrorUnreadableCookieFile) as e:
|
||||
sys.exit(e.args[0])
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
sys.exit()
|
||||
|
||||
# prepare files to share
|
||||
print(strings._("preparing_files"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user