Commits

Armin Rigo committed 8fb5a8e

Python 3 compat

Comments (0)

Files changed (2)

     from collections import Callable
     callable = lambda x: isinstance(x, Callable)
 
+try:
+    basestring
+except NameError:
+    # Python 3.x
+    basestring = str
+
 
 class FFIError(Exception):
     pass

testing/test_zintegration.py

         subprocess.check_call(['virtualenv', '--distribute',
                                '-p', sys.executable,
                                str(tmpdir)])
-    except OSError, e:
+    except OSError as e:
         py.test.skip("Cannot execute virtualenv: %s" % (e,))
 
     site_packages = None