Exception for load config
This commit is contained in:
parent
36a112a1dd
commit
d7a0c4045d
@ -62,7 +62,10 @@ def get_config(check_for=False):
|
||||
# Returns a config file, creating one if not existing.
|
||||
if os.path.exists("config.json"):
|
||||
with open("config.json") as f:
|
||||
try:
|
||||
config = json.load(f)
|
||||
except json.decoder.JSONDecodeError:
|
||||
config = create_config()
|
||||
if check_for:
|
||||
for i in check_for:
|
||||
if i not in config:
|
||||
|
Loading…
x
Reference in New Issue
Block a user