diff options
| author | 2020-09-24 18:54:10 +0300 | |
|---|---|---|
| committer | 2020-09-24 18:54:10 +0300 | |
| commit | 69d2292ec4b3fb2dc83f291ef1ed7bc86eabfd09 (patch) | |
| tree | b0c3c0991eef3fc278a0977baf129a7205ff469c /bot/exts/halloween/hacktoberstats.py | |
| parent | Merge remote-tracking branch 'origin/tic-tac-toe' into tic-tac-toe (diff) | |
| parent | Merge pull request #456 from Anubhav1603/update_dpy (diff) | |
Merge branch 'master' into tic-tac-toe
Diffstat (limited to 'bot/exts/halloween/hacktoberstats.py')
| -rw-r--r-- | bot/exts/halloween/hacktoberstats.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index e01ee50c..db5e37f2 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -123,7 +123,7 @@ class HacktoberStats(commands.Cog): """ if self.link_json.exists(): logging.info(f"Loading linked GitHub accounts from '{self.link_json}'") - with open(self.link_json, 'r') as file: + with open(self.link_json, 'r', encoding="utf8") as file: linked_accounts = json.load(file) logging.info(f"Loaded {len(linked_accounts)} linked GitHub accounts from '{self.link_json}'") @@ -145,7 +145,7 @@ class HacktoberStats(commands.Cog): } """ logging.info(f"Saving linked_accounts to '{self.link_json}'") - with open(self.link_json, 'w') as file: + with open(self.link_json, 'w', encoding="utf8") as file: json.dump(self.linked_accounts, file, default=str) logging.info(f"linked_accounts saved to '{self.link_json}'") |