Skip to content

Commit 8c1f7b8

Browse files
committed
cmds/archive: fix lost exception
A return in the finally block silently swallows the exception instead of reraising it. This caused archive scanning to be silently stopped on a exception and results in many unhandled archives.
1 parent ff00921 commit 8c1f7b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pym/bob/cmds/archive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def __exit__(self, *exc):
7777
return False
7878

7979
def scan(self, verbose):
80+
found = False
8081
try:
81-
found = False
8282
self.__db.execute("BEGIN")
8383
for l1 in os.listdir("."):
8484
if not self.__dirSchema.fullmatch(l1): continue
@@ -98,7 +98,7 @@ def scan(self, verbose):
9898
print("Your archive seems to be empty. "
9999
"Are you running 'bob archive' from within the correct directory?",
100100
file=sys.stderr)
101-
return found
101+
return found
102102

103103
def __scan(self, fileName, verbose):
104104
try:

0 commit comments

Comments
 (0)