Commit 077550b5 by James Keys Committed by Timothée Peignier

Narrow the scope of try: except clause

parent cd87d147
......@@ -45,13 +45,10 @@ class CachedFileFinder(BaseFinder):
"""
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 []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment