Skip to content

Commit

Permalink
fix a problem that disable --search option
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneyaoo committed Jul 28, 2019
1 parent 798bec3 commit d75691c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def __init__(self, parser, workflow):
return None

def search(self, sheetName, keyword):
if sheetName not in self._parser.availableSheets():
Options.warning("Cheat sheet not found.","", self._workflow)
return None
if sheetName==None:
ret=self._parser.searchAcrossAll(keyword, self._workflow)
else:
if sheetName not in self._parser.availableSheets():
Options.warning("Cheat sheet not found.","", self._workflow)
return None
ret=self._parser.searchInSheet(keyword, sheetName, self._workflow)
if ret==[]:
Options.warning("Not found", "No match found for search {}".format(keyword), self._workflow)
Expand Down

0 comments on commit d75691c

Please sign in to comment.