File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 46
46
47
47
__author__ = '[email protected] (Joe Beda)'
48
48
49
+ import errno
49
50
import json
50
51
import logging
51
52
import os
@@ -279,7 +280,17 @@ def _create_file_if_needed(self):
279
280
def _lock (self ):
280
281
"""Lock the entire multistore."""
281
282
self ._thread_lock .acquire ()
282
- self ._file .open_and_lock ()
283
+ try :
284
+ self ._file .open_and_lock ()
285
+ except IOError as e :
286
+ if e .errno == errno .ENOSYS :
287
+ logger .warn ('File system does not support locking the credentials '
288
+ 'file.' )
289
+ elif e .errno == errno .ENOLCK :
290
+ logger .warn ('File system is out of resources for writing the '
291
+ 'credentials file (is your disk full?).' )
292
+ else :
293
+ raise
283
294
if not self ._file .is_locked ():
284
295
self ._read_only = True
285
296
if self ._warn_on_readonly :
You can’t perform that action at this time.
0 commit comments