Review existing comments and add new ones
Also clarified a statement
This commit is contained in:
@@ -104,8 +104,8 @@ class Persister:
|
||||
try:
|
||||
self.object = pickle.load(handle)
|
||||
logger.debug('loaded persisted object from %r', self._path)
|
||||
# FIXME: catching too general exception (Exception)
|
||||
except Exception as e:
|
||||
# TODO: restrict kind of caught exceptions?
|
||||
# can fail for various reasons; in that case, pretend we didn't
|
||||
# load it
|
||||
logger.debug(e)
|
||||
@@ -127,7 +127,7 @@ class PersistedCache:
|
||||
try:
|
||||
os.makedirs(self.path)
|
||||
except OSError as e:
|
||||
if e.errno != 17: # FIXME
|
||||
if e.errno != os.errno.EEXIST: # FIXME: errno 17 is 'File Exists'
|
||||
raise
|
||||
|
||||
def _getPath(self, key):
|
||||
|
||||
Reference in New Issue
Block a user