From 9b3963799e5364445e776dc695e4f8b3b46652b4 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 2 Jan 2018 14:31:50 +1100 Subject: [PATCH] catch error in start_onion_service in case we somehow failed to parse a service_id in Stem controller response --- onionshare/onion.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/onionshare/onion.py b/onionshare/onion.py index 2f79719b..e577c769 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -413,7 +413,10 @@ class Onion(object): auth_cookie = res.content()[2][2].split('=')[1].split(':')[1] self.auth_string = 'HidServAuth {} {}'.format(onion_host, auth_cookie) - return onion_host + if onion_host is not None: + return onion_host + else: + raise TorErrorProtocolError(strings._('error_tor_protocol_error')) def cleanup(self): """