mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-09 09:55:00 -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
|
||||
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue