Use "except Exception" to catch all exception types

This commit is contained in:
Vangelis Banos 2019-09-21 09:43:27 +00:00
parent 6536516375
commit a09901dcef

View File

@ -167,7 +167,7 @@ class WarcWriter:
if self.open_suffix == '':
try:
fcntl.lockf(self.f, fcntl.LOCK_UN)
except (IOError, ValueError) as exc:
except Exception as exc:
self.logger.error(
'could not unlock file %s (%s)', self.path, exc)
self.f.close()