From b5b79f13edf2c4d7f046a6a373579bb8cf7a873e Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 25 Aug 2014 01:25:28 +0300 Subject: 0.3 - fixed used imports that failed on Python 2.6 Crash evidence: http://buildbot.scons.org/builders/debian6-python-2.6/builds/54/steps/shell/logs/stdio --- testing/framework/TestUnit/taprunner.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/testing/framework/TestUnit/taprunner.py b/testing/framework/TestUnit/taprunner.py index 31eb963..5c2e87c 100644 --- a/testing/framework/TestUnit/taprunner.py +++ b/testing/framework/TestUnit/taprunner.py @@ -6,13 +6,21 @@ Public domain work by: anatoly techtonik Changes: + 0.3 - fixed used imports that failed on Python 2.6 0.2 - removed unused import that failed on Python 2.6 0.1 - initial release """ -from unittest.runner import TextTestRunner, TextTestResult +__version__ = "0.3" + + +from unittest import TextTestRunner +try: + from unittest import TextTestResult +except ImportError: + # Python 2.6 + from unittest import _TextTestResult as TextTestResult -__version__ = "0.2" class TAPTestResult(TextTestResult): -- cgit v0.12