From 72105e3f4c254aa8d5b635fea00df793116329ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 18 May 2017 10:11:34 -0700 Subject: [PATCH] Allow the example/load.py script to load other repos from CLI --- example/load.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/load.py b/example/load.py index 42582bd4..253b6dcd 100644 --- a/example/load.py +++ b/example/load.py @@ -5,6 +5,7 @@ from __future__ import print_function from os.path import dirname, basename, abspath from datetime import datetime import logging +import sys import git @@ -177,7 +178,7 @@ if __name__ == '__main__': es = Elasticsearch() # we load the repo and all commits - load_repo(es) + load_repo(es, path=sys.argv[1] if len(sys.argv) == 2 else None) # run the bulk operations success, _ = bulk(es, REPO_ACTIONS, index='git', raise_on_error=True)