Skip to content

Commit b689021

Browse files
author
p12
committed
Transform/DDG: fix debugging support
1 parent 4cca614 commit b689021

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index2ddg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from build_link_map import build_link_map
2727
from ddg_parse_html import get_declaration, get_short_description, DdgException
2828

29-
if len(sys.argv) != 3 and not (sys.arg > 2 and sys.argv[1] == 'debug'):
29+
if len(sys.argv) != 3 and not (len(sys.argv) > 2 and sys.argv[2] == 'debug'):
3030
print('''Please provide the file name of the index as the first argument
3131
and the file name of the output as the second ''')
3232
sys.exit(1)
@@ -157,10 +157,10 @@ def get_name(ident):
157157
fn = page['fn']
158158

159159
if debug_ident:
160-
ignore = False
160+
ignore = True
161161
for ident in idents:
162-
if ident['ident'].find(debug_ident) == -1:
163-
ignore = True
162+
if ident['ident'].find(debug_ident) != -1:
163+
ignore = False
164164
break
165165
if ignore:
166166
continue

0 commit comments

Comments
 (0)