Fix broken exception handling.
authorZac Medico <zmedico@gentoo.org>
Sat, 17 Mar 2007 02:47:09 +0000 (02:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 17 Mar 2007 02:47:09 +0000 (02:47 -0000)
svn path=/main/trunk/; revision=6223

pym/portage/tests/__init__.py

index 7d13af1e6cc7a4f55ab9afb30c5e4f00a9d377ef..bef41ef03f7a95bf4b80e00a4b7d626bc9d8b1a3 100644 (file)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-import os, unittest, time
+import os, sys, time, unittest
 import portage.tests
 
 def main():
@@ -110,10 +110,10 @@ class TestCase(unittest.TestCase):
                                        result.addTodo(self,"%s: TODO" % testMethod)
                                else:
                                        result.addFailure(self, self._exc_info())
-                       except KeyboardInterrupt:
+                       except (KeyboardInterrupt, SystemExit):
                                raise
                        except:
-                               result.addError(self, self._exc_info())
+                               result.addError(self, sys.exc_info())
                        try:
                                self.tearDown()
                        except KeyboardInterrupt: