catch error in start_onion_service in case we somehow failed to parse a service_id in Stem controller response

This commit is contained in:
Miguel Jacq 2018-01-02 14:31:50 +11:00
parent 5c390f1bd9
commit 9b3963799e
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -413,7 +413,10 @@ class Onion(object):
auth_cookie = res.content()[2][2].split('=')[1].split(':')[1] auth_cookie = res.content()[2][2].split('=')[1].split(':')[1]
self.auth_string = 'HidServAuth {} {}'.format(onion_host, auth_cookie) 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): def cleanup(self):
""" """