[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/release] fix: connection resolution test was nonfunctional
commit 8364fc6a47238053738cce70f3cf9debe0cfb088
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Mon May 9 08:28:47 2011 -0700
fix: connection resolution test was nonfunctional
The second test (running targeted connection resolvers) was broken due to
changes in the connection util.
---
src/test.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test.py b/src/test.py
index e403076..af80879 100644
--- a/src/test.py
+++ b/src/test.py
@@ -78,9 +78,9 @@ while True:
printDivider()
break
- if userSelection.isdigit() and int(userSelection) in range(1, 8):
+ if userSelection.isdigit() and int(userSelection) in range(0, 7):
try:
- resolver = int(userSelection)
+ resolver = connections.Resolver.values()[int(userSelection)]
startTime = time.time()
print(connections.getResolverCommand(resolver, "tor", conn.getMyPid()))
@@ -93,7 +93,7 @@ while True:
print(" %s:%s -> %s:%s" % (lIp, lPort, fIp, fPort))
print("\n Runtime: %0.4f seconds" % (time.time() - startTime))
- except IOError, exc:
+ except (IOError, IndexError), exc:
print exc
else:
print("'%s' isn't a valid selection\n" % userSelection)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits