Skip to content

Commit d75691c

Browse files
committed
fix a problem that disable --search option
1 parent 798bec3 commit d75691c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/options.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def __init__(self, parser, workflow):
99
return None
1010

1111
def search(self, sheetName, keyword):
12-
if sheetName not in self._parser.availableSheets():
13-
Options.warning("Cheat sheet not found.","", self._workflow)
14-
return None
1512
if sheetName==None:
1613
ret=self._parser.searchAcrossAll(keyword, self._workflow)
1714
else:
15+
if sheetName not in self._parser.availableSheets():
16+
Options.warning("Cheat sheet not found.","", self._workflow)
17+
return None
1818
ret=self._parser.searchInSheet(keyword, sheetName, self._workflow)
1919
if ret==[]:
2020
Options.warning("Not found", "No match found for search {}".format(keyword), self._workflow)

0 commit comments

Comments
 (0)