skip missing config

This commit is contained in:
j 2025-10-20 10:31:42 +01:00
commit 454c4eeaa5

View file

@ -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)