[asterisk-commits] mjordan: testsuite/asterisk/trunk r2556 - in /asterisk/trunk: ./ lib/python/a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 12 15:42:36 CDT 2011


Author: mjordan
Date: Wed Oct 12 15:42:33 2011
New Revision: 2556

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2556
Log:
Added exception handling for copy as well hard links; fixed tuple issue in error message

Modified:
    asterisk/trunk/lib/python/asterisk/asterisk.py
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/asterisk.py?view=diff&rev=2556&r1=2555&r2=2556
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Wed Oct 12 15:42:33 2011
@@ -134,7 +134,7 @@
         self.process.poll()
         if self.process.returncode != None:
             """ Rut roh, Asterisk process exited prematurely """
-            logger.error("Asterisk instance %s exited prematurely with return code %d" % self.host, self.process.returncode)
+            logger.error("Asterisk instance %s exited prematurely with return code %d" % (self.host, self.process.returncode))
 
         self.cli_exec("core waitfullybooted")
 

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=2556&r1=2555&r2=2556
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Wed Oct 12 15:42:33 2011
@@ -99,6 +99,17 @@
                         except shutil.Error, err:
                             for e in err:
                                 print "Exception occurred while archiving logs from %s to %s: %s" % (e[0], e[1], e[2])
+                        except IOError, io:
+                            """ Don't let an IOError blow out the whole test run """
+                            print "IOError Exception occured while copying logs"
+                            try:
+                                (code, message) = io
+                            except:
+                                code = 0
+                                message = io
+                            print "ErrNo: %d - %s" % code, message
+                        except:
+                            print "Unknown exception occurred while attempting to copy logs"
                     except IOError, io:
                         """ Don't let an IOError blow out the whole test run """
                         print "IOError Exception occured while archiving logs"
@@ -108,6 +119,8 @@
                             code = 0
                             message = io
                         print "ErrNo: %d - %s" % code, message
+                    except:
+                        print "Unknown exception occurred while attempting to copy logs"
             else:
                 break
             i += 1




More information about the asterisk-commits mailing list