Explorar o código

no bare except

Thomas Waldmann %!s(int64=10) %!d(string=hai) anos
pai
achega
a21da5d2e0
Modificáronse 2 ficheiros con 2 adicións e 4 borrados
  1. 1 1
      attic/archive.py
  2. 1 3
      attic/fuse.py

+ 1 - 1
attic/archive.py

@@ -587,7 +587,7 @@ class ArchiveChecker:
                 continue
             try:
                 archive = msgpack.unpackb(data)
-            except:
+            except Exception:
                 continue
             if isinstance(archive, dict) and b'items' in archive and b'cmdline' in archive:
                 self.report_progress('Found archive ' + archive[b'name'].decode('utf-8'), error=True)

+ 1 - 3
attic/fuse.py

@@ -228,7 +228,5 @@ class AtticOperations(llfuse.Operations):
             daemonize()
         try:
             llfuse.main(single=True)
-        except:
+        finally:
             llfuse.close()
-            raise
-        llfuse.close()