mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[V3 Data Converter] Python3.5 compatibility issue patch (#1491)
* python3.5 patch * urf -> utf
This commit is contained in:
@@ -28,7 +28,7 @@ class DataConverter:
|
|||||||
The file isn't valid JSON
|
The file isn't valid JSON
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
with open(file_path, mode='r') as f:
|
with file_path.open(mode='r', encoding='utf-8') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
except (FileNotFoundError, json.JSONDecodeError):
|
except (FileNotFoundError, json.JSONDecodeError):
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user