mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-24 14:30:29 -04:00
Handle new Tor controller errors in CLI
This commit is contained in:
parent
1c53746dd5
commit
a838104025
2 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue