diff options
| author | 2020-05-25 10:34:52 +0100 | |
|---|---|---|
| committer | 2020-05-25 10:34:52 +0100 | |
| commit | bb30d2904b4a3273d4b10dc9548c542d65f0c379 (patch) | |
| tree | e6bf89e968dd39a153227aa8ca060496d2c3cbec /bot/exts/evergreen/branding.py | |
| parent | Merge pull request #401 from fuzzmz/minesweeper-disabled-dm-handling (diff) | |
| parent | Remove accidental extra word from docstring (diff) | |
Merge pull request #413 from jodth07/encoding_bug_fix
Encoding bug fix
Diffstat (limited to 'bot/exts/evergreen/branding.py')
| -rw-r--r-- | bot/exts/evergreen/branding.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/branding.py b/bot/exts/evergreen/branding.py index 1d463c5b..7e531011 100644 --- a/bot/exts/evergreen/branding.py +++ b/bot/exts/evergreen/branding.py @@ -171,7 +171,7 @@ class BrandingManager(commands.Cog): def _read_config(self) -> t.Dict[str, bool]: """Read and return persistent config file.""" - with self.config_file.open("r") as persistent_file: + with self.config_file.open("r", encoding="utf8") as persistent_file: return json.load(persistent_file) def _write_config(self, key: str, value: bool) -> None: @@ -179,7 +179,7 @@ class BrandingManager(commands.Cog): current_config = self._read_config() current_config[key] = value - with self.config_file.open("w") as persistent_file: + with self.config_file.open("w", encoding="utf8") as persistent_file: json.dump(current_config, persistent_file) async def _daemon_func(self) -> None: |