[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Missing check to see if the circuit's path exists
commit 7fe9a0e3242b48b95dc81061f7320fa500270f24
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sat Dec 5 14:51:46 2015 -0800
Missing check to see if the circuit's path exists
When starting nyx with a fresh tor instance we were liable to have a stacktrace
flicker due to indexing into the path of a circuit that doesn't yet have one.
---
nyx/connection_panel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nyx/connection_panel.py b/nyx/connection_panel.py
index 5f4f68b..42ddebd 100644
--- a/nyx/connection_panel.py
+++ b/nyx/connection_panel.py
@@ -186,7 +186,7 @@ class ConnectionEntry(Entry):
if fingerprint:
for circ in controller.get_circuits([]):
- if circ.path[0][0] == fingerprint and circ.status == 'BUILT':
+ if circ.path and circ.path[0][0] == fingerprint and circ.status == 'BUILT':
# Tor builds one-hop circuits to retrieve directory information.
# If longer this is likely a connection to a guard.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits