skip missing config
This commit is contained in:
parent
a7816225a5
commit
454c4eeaa5
1 changed files with 5 additions and 2 deletions
|
|
@ -426,8 +426,11 @@ def main():
|
||||||
log_format = '%(asctime)s:%(levelname)s:%(name)s:%(message)s'
|
log_format = '%(asctime)s:%(levelname)s:%(name)s:%(message)s'
|
||||||
logging.basicConfig(level=logging.DEBUG, format=log_format)
|
logging.basicConfig(level=logging.DEBUG, format=log_format)
|
||||||
if args.config:
|
if args.config:
|
||||||
with open(args.config) as fd:
|
if os.path.exists(args.config):
|
||||||
CONFIG.update(json.load(fd))
|
with open(args.config) as fd:
|
||||||
|
CONFIG.update(json.load(fd))
|
||||||
|
else:
|
||||||
|
logger.error("config file %s does not exist, skipping", args.config)
|
||||||
|
|
||||||
base = os.path.dirname(os.path.abspath(__file__))
|
base = os.path.dirname(os.path.abspath(__file__))
|
||||||
#os.chdir(base)
|
#os.chdir(base)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue