[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Fixing IndexErrors related to path
commit f0888ecdb89880ea38f6afe2d210ac34c16844ba
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Mon Sep 2 11:43:50 2013 -0700
Fixing IndexErrors related to path
Quick fix for a couple indexing errors that's crashing arm when I first start
it up.
---
arm/connections/connEntry.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arm/connections/connEntry.py b/arm/connections/connEntry.py
index 1760d19..8ade8e5 100644
--- a/arm/connections/connEntry.py
+++ b/arm/connections/connEntry.py
@@ -421,7 +421,7 @@ class ConnectionLine(entries.ConnectionPanelLine):
# mirror).
for _, status, _, path in myCircuits:
- if path[0] == destFingerprint and (status != "BUILT" or len(path) > 1):
+ if path and path[0] == destFingerprint and (status != "BUILT" or len(path) > 1):
self.cachedType = Category.CIRCUIT # matched a probable guard connection
# if we fell through, we can eliminate ourselves as a guard in the future
@@ -432,7 +432,7 @@ class ConnectionLine(entries.ConnectionPanelLine):
# Checks if we match a built, single hop circuit.
for _, status, _, path in myCircuits:
- if path[0] == destFingerprint and status == "BUILT" and len(path) == 1:
+ if path and path[0] == destFingerprint and status == "BUILT" and len(path) == 1:
self.cachedType = Category.DIRECTORY
# if we fell through, eliminate ourselves as a directory connection
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits