commit 3ee931dbdb43386fec8274c311e33ca94d93293f Author: juga0 juga@riseup.net Date: Wed Jul 4 08:01:56 2018 +0000
Replace Exception by the possible exceptions --- sbws/lib/relaylist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sbws/lib/relaylist.py b/sbws/lib/relaylist.py index bb59a3b..e623ab7 100644 --- a/sbws/lib/relaylist.py +++ b/sbws/lib/relaylist.py @@ -1,6 +1,6 @@ from stem.descriptor.router_status_entry import RouterStatusEntryV3 from stem.descriptor.server_descriptor import ServerDescriptor -from stem import Flag +from stem import Flag, DescriptorUnavailable, ControllerError from stem.util.connection import is_valid_ipv4_address from stem.util.connection import is_valid_ipv6_address import random @@ -30,7 +30,7 @@ class Relay: else: try: self._ns = cont.get_network_status(fp, default=None) - except Exception as e: + except (DescriptorUnavailable, ControllerError) as e: log.exception("Exception trying to get ns %s", e) self._ns = None if desc is not None:
tor-commits@lists.torproject.org