commit 8ca26840f210438d5dc049007547fabfb054b0ff
Author: juga0 <juga(a)riseup.net>
Date: Wed Jul 4 08:09:46 2018 +0000
Replace Exception by the possible exception
---
sbws/util/stem.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sbws/util/stem.py b/sbws/util/stem.py
index d52fea2..8d4989e 100644
--- a/sbws/util/stem.py
+++ b/sbws/util/stem.py
@@ -1,5 +1,6 @@
from stem.control import (Controller, Listener)
-from stem import (SocketError, InvalidRequest, UnsatisfiableRequest)
+from stem import (SocketError, InvalidRequest, UnsatisfiableRequest,
+ OperationFailed)
from stem.connection import IncorrectSocketType
import stem.process
from configparser import ConfigParser
@@ -27,7 +28,7 @@ def attach_stream_to_circuit_listener(controller, circ_id):
except (UnsatisfiableRequest, InvalidRequest) as e:
log.warning('Couldn\'t attach stream to circ %s: %s',
circ_id, e)
- except Exception as e:
+ except OperationFailed as e:
log.exception("Error attaching stream %s to circ %s: %s",
st.id, circ_id, e)
else: