[Pkg-privacy-commits] [onionshare] 52/256: Handle new Tor controller errors in CLI
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to branch master
in repository onionshare.
commit ebf13cfa116f591e0c881aa911608e8215499099
Author: Micah Lee <micah at micahflee.com>
Date: Thu Dec 29 10:16:20 2016 -0800
Handle new Tor controller errors in CLI
---
onionshare/onion.py | 1 -
onionshare/onionshare.py | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 03dfde2..ca3a6e6 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -58,7 +58,6 @@ class TorErrorUnreadableCookieFile(Exception):
"""
pass
-
class NoTor(Exception):
"""
This exception is raised if onionshare can't find a Tor control port
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index c87b781..6537f10 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -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"))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list