[asterisk-commits] russell: testsuite/asterisk/trunk r119 - /asterisk/trunk/runtests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 24 06:36:31 CDT 2010


Author: russell
Date: Wed Mar 24 06:33:39 2010
New Revision: 119

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=119
Log:
Resolve a python version compatibility issue.

Modified:
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=119&r1=118&r2=119
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Wed Mar 24 06:33:39 2010
@@ -90,8 +90,8 @@
         test_config = "tests/%s/test-config.yaml" % self.test_name
         try:
             f = open(test_config, "r")
-        except IOError as (errno, strerror):
-            print "Failed to open %s: %s" % (test_config, strerror)
+        except IOError:
+            print "Failed to open %s" % test_config
             return
         except:
             print "Unexpected error: %s" % sys.exc_info()[0]
@@ -131,8 +131,8 @@
     def __init__(self, ast_version):
         try:
             f = open(TESTS_CONFIG, "r")
-        except IOError as (errno, strerror):
-            print "Failed to open %s: %s" % (TESTS_CONFIG, strerror)
+        except IOError:
+            print "Failed to open %s" % TESTS_CONFIG
             return
         except:
             print "Unexpected error: %s" % sys.exc_info()[0]
@@ -217,8 +217,8 @@
     def write_results_xml(self, fn, stdout=False):
         try:
             f = open(TEST_RESULTS, "w")
-        except IOError as (errno, strerror):
-            print "Failed to open test results output file: %s" % strerror
+        except IOError:
+            print "Failed to open test results output file: %s" % TEST_RESULTS
             return
         except:
             print "Unexpected error: %s" % sys.exc_info()[0]
@@ -242,8 +242,9 @@
         if stdout is True:
             try:
                 f = open(TEST_RESULTS, "r")
-            except IOError as (errno, strerror):
-                print "Failed to open test results output file: %s" % strerror
+            except IOError:
+                print "Failed to open test results output file: %s" % \
+                        TEST_RESULTS
             except:
                 print "Unexpected error: %s" % sys.exc_info()[0]
             else:




More information about the asterisk-commits mailing list