commit 52348a6ab4a58ac48af61fbe14a56677625ae8ef Author: Damian Johnson atagar@torproject.org Date: Wed Jul 6 09:35:15 2016 -0700
Stacktrace when CircuitEvent compared
Nyx is getting stacktraces which are due to referring to an attribute that doesn't exist. CircuitEvents aren't documented as having a socks_port but they *do* have a socks_password...
File "/home/atagar/Desktop/nyx/nyx/panel/connection.py", line 625, in _update new_entries.append(Entry.from_circuit(circ)) File "/home/atagar/Desktop/nyx/stem/util/lru_cache.py", line 122, in wrapper link = cache_get(key) File "/home/atagar/Desktop/nyx/stem/response/events.py", line 419, in __eq__ return self._compare(other, lambda s, o: s == o) File "/home/atagar/Desktop/nyx/stem/response/events.py", line 392, in _compare my_attr = getattr(self, attr) AttributeError: 'CircuitEvent' object has no attribute 'socks_port' --- stem/response/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stem/response/events.py b/stem/response/events.py index 86ed2b4..91aaecd 100644 --- a/stem/response/events.py +++ b/stem/response/events.py @@ -388,7 +388,7 @@ class CircuitEvent(Event): if not isinstance(other, CircuitEvent): return False
- for attr in ('id', 'status', 'path', 'build_flags', 'purpose', 'hs_state', 'rend_query', 'created', 'reason', 'remote_reason', 'socks_username', 'socks_port'): + for attr in ('id', 'status', 'path', 'build_flags', 'purpose', 'hs_state', 'rend_query', 'created', 'reason', 'remote_reason', 'socks_username', 'socks_password'): my_attr = getattr(self, attr) other_attr = getattr(other, attr)
tor-commits@lists.torproject.org