fix for older python who have oddly named __exc_info()
authorAlec Warner <antarus@gentoo.org>
Sat, 17 Mar 2007 07:11:40 +0000 (07:11 -0000)
committerAlec Warner <antarus@gentoo.org>
Sat, 17 Mar 2007 07:11:40 +0000 (07:11 -0000)
svn path=/main/trunk/; revision=6227

pym/portage/tests/__init__.py

index bef41ef03f7a95bf4b80e00a4b7d626bc9d8b1a3..3eaec03ecfd08cdd10a19452585c9d35cce70dd8 100644 (file)
@@ -85,6 +85,9 @@ class TestCase(unittest.TestCase):
                self._testMethodName = methodName
                unittest.TestCase.__init__(self, methodName)
                self.todo = False
+               # compat hack for older pythons
+               if not self._exc_info and self.__exc_info
+                       self._exc_info = self.__exc_info
                
        def defaultTestResult(self):
                return TextTestResult()