From a09901dcefe8060bb2802d7937aec8570048d4c5 Mon Sep 17 00:00:00 2001 From: Vangelis Banos Date: Sat, 21 Sep 2019 09:43:27 +0000 Subject: [PATCH] Use "except Exception" to catch all exception types --- warcprox/writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warcprox/writer.py b/warcprox/writer.py index 639e96d..5187d08 100644 --- a/warcprox/writer.py +++ b/warcprox/writer.py @@ -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()