Skip to content

Commit 4b3a406

Browse files
committed
Also check for errno.EPERM to trigger fallback locking mode
1 parent 6c0adb7 commit 4b3a406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2client/locked_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def open_and_lock(self, timeout, delay):
194194
self._fh = open(self._filename, self._mode)
195195
except IOError, e:
196196
# If we can't access with _mode, try _fallback_mode and don't lock.
197-
if e.errno == errno.EACCES:
197+
if e.errno in ( errno.EPERM, errno.EACCES ):
198198
self._fh = open(self._filename, self._fallback_mode)
199199
return
200200

0 commit comments

Comments
 (0)