Spaces:
Sleeping
Sleeping
TheYoBots commited on
Commit ·
c937d6c
1
Parent(s): 648e925
Update config.py
Browse files
config.py
CHANGED
|
@@ -5,7 +5,7 @@ import os.path
|
|
| 5 |
def load_config(config_file):
|
| 6 |
with open(config_file) as stream:
|
| 7 |
try:
|
| 8 |
-
CONFIG = yaml.
|
| 9 |
except Exception as e:
|
| 10 |
print("There appears to be a syntax problem with your config.yml")
|
| 11 |
raise e
|
|
@@ -30,7 +30,7 @@ def load_config(config_file):
|
|
| 30 |
raise Exception("´engine´ subsection {}".format(subsection[2]))
|
| 31 |
|
| 32 |
if CONFIG["token"] == "xxxxxxxxxxxxxxxx":
|
| 33 |
-
raise Exception("Your config.yml has the default
|
| 34 |
|
| 35 |
if not os.path.isdir(CONFIG["engine"]["dir"]):
|
| 36 |
raise Exception("Your engine directory `{}` is not a directory.")
|
|
|
|
| 5 |
def load_config(config_file):
|
| 6 |
with open(config_file) as stream:
|
| 7 |
try:
|
| 8 |
+
CONFIG = yaml.safe_load(stream)
|
| 9 |
except Exception as e:
|
| 10 |
print("There appears to be a syntax problem with your config.yml")
|
| 11 |
raise e
|
|
|
|
| 30 |
raise Exception("´engine´ subsection {}".format(subsection[2]))
|
| 31 |
|
| 32 |
if CONFIG["token"] == "xxxxxxxxxxxxxxxx":
|
| 33 |
+
raise Exception("Your config.yml has the default Lichess API token. This is probably wrong.")
|
| 34 |
|
| 35 |
if not os.path.isdir(CONFIG["engine"]["dir"]):
|
| 36 |
raise Exception("Your engine directory `{}` is not a directory.")
|