fix(config): pylint fixes
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 31s
All checks were successful
Pylint / Pylint (3.11) (push) Successful in 31s
This commit is contained in:
parent
c6d31f79ce
commit
f66de25731
1 changed files with 4 additions and 3 deletions
|
@ -1,13 +1,14 @@
|
||||||
import json, logging
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
def load_config():
|
def load_config():
|
||||||
try:
|
try:
|
||||||
with open('./cfg/config.json') as config_file:
|
with open('./cfg/config.json', encoding="utf_8") as config_file:
|
||||||
data = json.load(config_file)
|
data = json.load(config_file)
|
||||||
return data
|
return data
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logging.fatal("The configuration file was not found.")
|
logging.fatal("The configuration file was not found.")
|
||||||
return None
|
return None
|
||||||
except json.JSONDecodeError as e:
|
except json.JSONDecodeError as e:
|
||||||
logging.fatal("Error decoding the JSON file: {0}".format(e))
|
logging.fatal("Error decoding the JSON file: %s", e)
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue