commit 3036638b9ebe69bd36ab312b9eb5b275a39d89a8 Author: juga0 juga@riseup.net Date: Wed Jul 4 08:32:05 2018 +0000
Replace Exception by the possible exceptions --- sbws/lib/circuitbuilder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sbws/lib/circuitbuilder.py b/sbws/lib/circuitbuilder.py index f143b6a..faa73cf 100644 --- a/sbws/lib/circuitbuilder.py +++ b/sbws/lib/circuitbuilder.py @@ -1,5 +1,5 @@ from stem import CircuitExtensionFailed, InvalidRequest, ProtocolError, Timeout -from stem import InvalidArguments +from stem import InvalidArguments, ControllerError import random from .relaylist import Relay import logging @@ -64,7 +64,7 @@ class CircuitBuilder: except InvalidArguments: pass self.built_circuits.discard(circ_id) - except Exception as e: + except (ControllerError, ValueError) as e: log.exception("Error trying to get circuit to close it: %s.", e)
def _build_circuit_impl(self, path):
tor-commits@lists.torproject.org