Skip to content

Commit

Permalink
Narrow the scope of try: except clause
Browse files Browse the repository at this point in the history
  • Loading branch information
skolsuper authored and cyberdelia committed Jul 26, 2015
1 parent cd87d14 commit 077550b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pipeline/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ def find(self, path, all=False):
"""
try:
start, _, extn = path.rsplit('.', 2)
path = '.'.join((start, extn))
result = find(path, all=all)
if not result:
return []
return result
except ValueError:
return []
path = '.'.join((start, extn))
return find(path, all=all) or []

def list(self, *args):
return []
Expand Down

0 comments on commit 077550b

Please sign in to comment.