diff options
| author | 2020-04-11 07:43:56 +0200 | |
|---|---|---|
| committer | 2020-05-30 00:30:27 +0200 | |
| commit | f7fe7df271b0e0930fa8b997c087bb3be141d016 (patch) | |
| tree | 77d10737affc379310b21eae7fc520f656e0f0a1 | |
| parent | Merge pull request #965 from Akarys42/patch-1 (diff) | |
Tags: explicitly use UTF-8 to read files
Not all operating systems use UTF-8 as the default encoding. For systems
that don't, reading tag files with Unicode would cause an unhandled
exception.
(cherry picked from commit adc75ff9bbcf8b905bd78c78f253522ae5e42fc3)
| -rw-r--r-- | bot/cogs/tags.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index bc7f53f68..6f03a3475 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -44,7 +44,7 @@ class Tags(Cog):                  tag = {                      "title": tag_title,                      "embed": { -                        "description": file.read_text(), +                        "description": file.read_text(encoding="utf8"),                      },                      "restricted_to": "developers",                  }  |