[tor-commits] [nyx/master] Missing check to see if the circuit's path exists

atagar at torproject.org atagar at torproject.org
Mon Jan 4 17:43:05 UTC 2016


commit 7fe9a0e3242b48b95dc81061f7320fa500270f24
Author: Damian Johnson <atagar at torproject.org>
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.
 





More information about the tor-commits mailing list