|
|
@@ -16,12 +16,15 @@ from datetime import datetime, date, timedelta |
|
|
|
try: |
|
|
|
filedir = os.path.dirname(os.path.abspath(__file__)) |
|
|
|
if len(sys.argv) < 2: |
|
|
|
print("Using default config location: %s/config.json" % filedir) |
|
|
|
config = json.load(open(filedir+'/config.json')) |
|
|
|
configpath = filedir+'/config.json' |
|
|
|
print("Using default config location: ", configpath) |
|
|
|
config = json.load(open(configpath)) |
|
|
|
else: |
|
|
|
config = json.load(open(sys.argv[1])) |
|
|
|
configpath = sys.argv[1] |
|
|
|
config = json.load(open(configpath)) |
|
|
|
|
|
|
|
except: |
|
|
|
print("didn't find config file: ", configpath) |
|
|
|
print("ERROR: Config file not found!") |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|