Add a conditional around the config file parsing attempt

This commit is contained in:
Scott Wallace 2021-05-27 08:04:55 +01:00
parent b6fa8e6632
commit 9f86ea1f30
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -30,6 +30,7 @@ class Config:
logging.debug('Parsing config')
parsed = {}
if configfile is not None:
try:
with open(configfile, 'r') as file:
parsed = yaml.safe_load(file.read())