From 2bd70c4fe887b03d558a646c30677046d83c10c0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 24 Jun 2017 22:06:02 +0300 Subject: Fix: avoid bare "except:" statements --- obnamlib/plugins/fuse_plugin.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'obnamlib/plugins/fuse_plugin.py') diff --git a/obnamlib/plugins/fuse_plugin.py b/obnamlib/plugins/fuse_plugin.py index 97025dfb..3e505d0f 100644 --- a/obnamlib/plugins/fuse_plugin.py +++ b/obnamlib/plugins/fuse_plugin.py @@ -104,7 +104,7 @@ class ObnamFuseFile(object): try: self.metadata = self.fuse_fs.get_metadata_in_generation(path) - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise @@ -342,7 +342,7 @@ class ObnamFuse(fuse.Fuse): return self.get_stat_in_generation(path) except obnamlib.ObnamError: raise IOError(errno.ENOENT, 'No such file or directory') - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise @@ -360,7 +360,7 @@ class ObnamFuse(fuse.Fuse): return [fuse.Direntry(name) for name in ['.', '..'] + listdir] except obnamlib.ObnamError: raise IOError(errno.EINVAL, 'Invalid argument') - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise @@ -376,7 +376,7 @@ class ObnamFuse(fuse.Fuse): raise IOError(errno.EINVAL, 'Invalid argument') except obnamlib.ObnamError: raise IOError(errno.ENOENT, 'No such file or directory') - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise @@ -449,7 +449,7 @@ class ObnamFuse(fuse.Fuse): return value except obnamlib.ObnamError: raise IOError(errno.ENOENT, 'No such file or directory') - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise @@ -480,7 +480,7 @@ class ObnamFuse(fuse.Fuse): return name_blob.split('\0')[:-1] except obnamlib.ObnamError: raise IOError(errno.ENOENT, 'No such file or directory') - except: + except BaseException: logging.error('Unexpected exception', exc_info=True) raise -- cgit v1.2.1