Skip to content

Commit

Permalink
expose index option for cc_py module
Browse files Browse the repository at this point in the history
  • Loading branch information
jgor committed Dec 12, 2018
1 parent bc36840 commit 6db7686
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indexers/cc_py.py
Expand Up @@ -26,10 +26,12 @@ def run(args):
cc_py_path = default_cc_py_path
domain = args["domain"]
year = args.get("year", "")
index = args.get("index", "")

with tempfile.NamedTemporaryFile() as temp_file:
index_cmd = [os.path.join(cc_py_path, "cc.py")]
if year: index_cmd += ["-y", year]
if index: index_cmd += ["-i", index]
index_cmd += ["-o", temp_file.name]
index_cmd += [domain]

Expand Down

0 comments on commit 6db7686

Please sign in to comment.