TheYoBots commited on
Commit
c937d6c
·
1 Parent(s): 648e925

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +2 -2
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.load(stream)
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 Lishogi 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.")
 
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.")