From 20b4f49b4e71c90581c68ea7f4cf56160a6bdc79 Mon Sep 17 00:00:00 2001 From: Daniele Esposti Date: Fri, 7 Oct 2016 23:42:32 +0100 Subject: Fix syntax for Python 3.x --- git/util.py | 4 ++-- 1 file 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 -- cgit v1.2.1