mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-10 11:48:56 -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
|
pass
|
||||||
|
|
||||||
|
|
||||||
class NoTor(Exception):
|
class NoTor(Exception):
|
||||||
"""
|
"""
|
||||||
This exception is raised if onionshare can't find a Tor control port
|
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 = OnionShare(debug, local_only, stay_open, transparent_torification, stealth)
|
||||||
app.choose_port()
|
app.choose_port()
|
||||||
app.start_onion_service()
|
app.start_onion_service()
|
||||||
except onion.NoTor 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 onion.TorTooOld as e:
|
|
||||||
sys.exit(e.args[0])
|
sys.exit(e.args[0])
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
# prepare files to share
|
# prepare files to share
|
||||||
print(strings._("preparing_files"))
|
print(strings._("preparing_files"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user