config file name from cmd args added
diff --git a/config.py b/config.py
index 3db7547..e77058f 100644
--- a/config.py
+++ b/config.py
@@ -1,3 +1,5 @@
+import argparse
+import sys
import yaml
import os
@@ -9,9 +11,20 @@
return cfg
-cfg_dict = parse_config(os.path.join(os.path.dirname(__file__), 'config.yaml'))
+parser = argparse.ArgumentParser(description="config file name")
+parser.add_argument("-p", "--path")
+
+config = parser.parse_args(sys.argv[1:])
+path = "config.yaml"
+
+if not config.path is None:
+ path = config.path
+
+cfg_dict = parse_config(os.path.join(os.path.dirname(__file__), path))
basedir = cfg_dict['paths']['basedir']
TEST_PATH = cfg_dict['paths']['TEST_PATH']
SQLALCHEMY_MIGRATE_REPO = cfg_dict['paths']['SQLALCHEMY_MIGRATE_REPO']
DATABASE_URI = cfg_dict['paths']['DATABASE_URI']
-CHARTS_IMG_PATH = cfg_dict['paths']['CHARTS_IMG_PATH']
\ No newline at end of file
+CHARTS_IMG_PATH = cfg_dict['paths']['CHARTS_IMG_PATH']
+
+