handle no results situation

pull/241/head
William Ting 11 years ago
parent 1a2a5a86f6
commit c2189efb7b

@ -212,7 +212,8 @@ def find_matches(config, needles, count=1):
exact_matches = match_regex(needles, data, ignore_case)
exists = lambda entry: os.path.exists(entry.path)
return first(ifilter(exists, exact_matches)).path
result = first(ifilter(exists, exact_matches))
return result.path if result else u''
def match_end(needle, haystack, ignore_case=False):

Loading…
Cancel
Save