Skip to content

Commit 20b4f49

Browse files
committed
Fix syntax for Python 3.x
1 parent 4c9dd7f commit 20b4f49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: git/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def flock(fd, flags=0):
6868
# Unlock file descriptor
6969
try:
7070
win32file.UnlockFileEx(hfile, 0, -0x10000, __overlapped)
71-
except pywintypes.error, exc_value:
71+
except pywintypes.error as exc_value:
7272
# error: (158, 'UnlockFileEx', 'The segment is already unlocked.')
7373
# To match the 'posix' implementation, silently ignore this error
7474
if exc_value[0] == 158:
@@ -81,7 +81,7 @@ def flock(fd, flags=0):
8181
# Lock file
8282
try:
8383
win32file.LockFileEx(hfile, flags, 0, -0x10000, __overlapped)
84-
except pywintypes.error, exc_value:
84+
except pywintypes.error as exc_value:
8585
if exc_value[0] == 33:
8686
# error: (33, 'LockFileEx',
8787
# 'The process cannot access the file because another process has locked

0 commit comments

Comments
 (0)