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):
|
||||
|
||||
@@ -297,6 +297,7 @@ class Program:
|
||||
print('Type : %s' % metadata.releaseType)
|
||||
if metadata.barcode:
|
||||
print("Barcode : %s" % metadata.barcode)
|
||||
# TODO: Add test for non ASCII catalog numbers: see issue #215
|
||||
if metadata.catalogNumber:
|
||||
print("Cat no : %s" %
|
||||
metadata.catalogNumber.encode('utf-8'))
|
||||
|
||||
@@ -87,6 +87,7 @@ class PopenTask(task.Task):
|
||||
return
|
||||
|
||||
self._done()
|
||||
# FIXME: catching too general exception (Exception)
|
||||
except Exception as e:
|
||||
logger.debug('exception during _read(): %s', e)
|
||||
self.setException(e)
|
||||
|
||||
Reference in New Issue
Block a user