diff options
-rwxr-xr-x | git-p4.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -27,6 +27,22 @@ import zlib import ctypes import errno +# support basestring in python3 +try: + unicode = unicode +except NameError: + # 'unicode' is undefined, must be Python 3 + str = str + unicode = str + bytes = bytes + basestring = (str,bytes) +else: + # 'unicode' exists, must be Python 2 + str = str + unicode = unicode + bytes = str + basestring = basestring + try: from subprocess import CalledProcessError except ImportError: |