Skip to content

Commit 077550b

Browse files
skolsupercyberdelia
authored andcommitted
Narrow the scope of try: except clause
1 parent cd87d14 commit 077550b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pipeline/finders.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,10 @@ def find(self, path, all=False):
4545
"""
4646
try:
4747
start, _, extn = path.rsplit('.', 2)
48-
path = '.'.join((start, extn))
49-
result = find(path, all=all)
50-
if not result:
51-
return []
52-
return result
5348
except ValueError:
5449
return []
50+
path = '.'.join((start, extn))
51+
return find(path, all=all) or []
5552

5653
def list(self, *args):
5754
return []

0 commit comments

Comments
 (0)