aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-08-10 19:49:01 +0100
committerGravatar Gareth Coles <[email protected]>2018-08-10 19:49:01 +0100
commit4548bed9fd659d91fc8095f359e33b3bde83b258 (patch)
tree3d4f2de5c64268224f4a472c4c4371878cdc6f85
parentupdating the watchlist to catch retarted (diff)
[Constants] Specify encoding for YAML files
-rw-r--r--bot/constants.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 1e789ff3a..3ded974a4 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -99,7 +99,7 @@ yaml.SafeLoader.add_constructor("!JOIN", _join_var_constructor)
yaml.SafeLoader.add_constructor("!REQUIRED_ENV", _required_env_var_constructor)
-with open("config-default.yml") as f:
+with open("config-default.yml", encoding="UTF-8") as f:
_CONFIG_YAML = yaml.safe_load(f)
@@ -124,7 +124,7 @@ def _recursive_update(original, new):
if Path("config.yml").exists():
log.info("Found `config.yml` file, loading constants from it.")
- with open("config.yml") as f:
+ with open("config.yml", encoding="UTF-8") as f:
user_config = yaml.safe_load(f)
_recursive_update(_CONFIG_YAML, user_config)