diff options
author | Daniele Esposti <daniele.esposti@gmail.com> | 2016-10-07 23:42:32 +0100 |
---|---|---|
committer | Daniele Esposti <daniele.esposti@gmail.com> | 2016-10-07 23:43:09 +0100 |
commit | 20b4f49b4e71c90581c68ea7f4cf56160a6bdc79 (patch) | |
tree | c1e80a51313ceaa8a1d4c6f80b543d5f71ee2b0b | |
parent | 4c9dd7fac214bb0f85077cab40d4455cf3113b17 (diff) | |
download | gitpython-20b4f49b4e71c90581c68ea7f4cf56160a6bdc79.tar.gz |
Fix syntax for Python 3.x
-rw-r--r-- | git/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git/util.py b/git/util.py index ab27dadf..037fd91b 100644 --- a/git/util.py +++ b/git/util.py @@ -68,7 +68,7 @@ if platform.system() == 'Windows': # Unlock file descriptor try: win32file.UnlockFileEx(hfile, 0, -0x10000, __overlapped) - except pywintypes.error, exc_value: + except pywintypes.error as exc_value: # error: (158, 'UnlockFileEx', 'The segment is already unlocked.') # To match the 'posix' implementation, silently ignore this error if exc_value[0] == 158: @@ -81,7 +81,7 @@ if platform.system() == 'Windows': # Lock file try: win32file.LockFileEx(hfile, flags, 0, -0x10000, __overlapped) - except pywintypes.error, exc_value: + except pywintypes.error as exc_value: if exc_value[0] == 33: # error: (33, 'LockFileEx', # 'The process cannot access the file because another process has locked |