[tor-commits] [sbws/master] Replace Exception by the possible exceptions
pastly at torproject.org
pastly at torproject.org
Wed Jul 11 15:05:40 UTC 2018
commit 3036638b9ebe69bd36ab312b9eb5b275a39d89a8
Author: juga0 <juga at 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):
More information about the tor-commits
mailing list