Skip to content

Commit 2ab0123

Browse files
committed
Really request JAVASCRIPT as lang (requires list).
Fix language lookup and skip append if missing.
1 parent e9b7047 commit 2ab0123

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bin/addheader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def main(argv):
204204
continue
205205
print("Inspecting %s" % src_path)
206206
for pattern in list_code_files():
207-
needs_block = pattern in list_code_files(JAVASCRIPT)
207+
needs_block = pattern in list_code_files([JAVASCRIPT])
208208
pattern = os.path.normpath(
209209
os.path.join(mig_code_base, CODE_ROOT, pattern)
210210
)

mig/shared/projcode.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def list_code_files(code_langs=[keyword_all]):
111111
"""Get list of all code files."""
112112
match = []
113113
for lang in code_langs:
114-
if not lang in code_langs:
114+
if not lang in LANG_MAP:
115115
print("Warning: no such code lang: %s" % lang)
116-
match += LANG_MAP.get(lang, [])
116+
else:
117+
match += LANG_MAP[lang]
117118
return match

0 commit comments

Comments
 (0)