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