From: Zac Medico Date: Sat, 17 Mar 2007 02:47:09 +0000 (-0000) Subject: Fix broken exception handling. X-Git-Tag: v2.2_pre1~1576 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f818faf7b7fd4f9dc5794e35e2515c95b011cc3e;p=portage.git Fix broken exception handling. svn path=/main/trunk/; revision=6223 --- diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 7d13af1e6..bef41ef03 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -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: