From: Lisandro Dalcin Date: Thu, 8 Oct 2009 23:30:07 +0000 (-0300) Subject: a few Py3k fixes in runtests.py X-Git-Tag: 0.13.beta0~2^2~121^2~99^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f2b10afaa824c5f53d418a148dec792a8d3ac53;p=cython.git a few Py3k fixes in runtests.py --- diff --git a/runtests.py b/runtests.py index f5e53405..4323dcc3 100644 --- a/runtests.py +++ b/runtests.py @@ -8,7 +8,10 @@ import shutil import unittest import doctest import operator -from StringIO import StringIO +try: + from StringIO import StringIO +except ImportError: + from io import StringIO try: import cPickle as pickle @@ -394,7 +397,7 @@ class CythonRunTestCase(CythonCompileTestCase): try: partial_result = PartialTestResult(result) doctest.DocTestSuite(module_name).run(partial_result) - except Exception, e: + except Exception: partial_result.addError(module_name, sys.exc_info()) result_code = 1 pickle.dump(partial_result.data(), output)