[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Uncaught IOError when checking version in integ



commit ea511db40259a74d57d87a40339b41e66fe34d9a
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Jan 2 14:32:13 2012 -0800

    Uncaught IOError when checking version in integ
    
    If our attempt to look up 'tor --version' failed then we'd trigger an uncaught
    IOError. We're only checking the version there to determine if we should skip
    the test due to tor being out of date, so making that a best-effort lookup
    instead. Caught by boerni.
---
 test/integ/socket/control_message.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/test/integ/socket/control_message.py b/test/integ/socket/control_message.py
index 7b14872..b939c87 100644
--- a/test/integ/socket/control_message.py
+++ b/test/integ/socket/control_message.py
@@ -121,8 +121,15 @@ class TestControlMessage(unittest.TestCase):
     """
     
     req_version = stem.version.Requirement.GETINFO_CONFIG_TEXT
-    if stem.version.get_system_tor_version() < req_version:
-      self.skipTest("(requires %s)" % req_version)
+    
+    try:
+      if stem.version.get_system_tor_version() < req_version:
+        self.skipTest("(requires %s)" % req_version)
+    except IOError:
+      # This is a best-effot lookup to avoid showing a valid failure. If the
+      # version lookup fails then running the test.
+      
+      pass
     
     # We can't be certain of the order, and there may be extra config-text
     # entries as per...

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits