Skip to content

Commit

Permalink
Merge pull request #132 from dmunozv04/open-file-utf-8
Browse files Browse the repository at this point in the history
open and close config file with
  • Loading branch information
dmunozv04 authored Jan 17, 2024
2 parents 0453316 + 4e3c9d1 commit a75dd83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iSponsorBlockTV/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def validate(self):

def __load(self):
try:
with open(self.config_file, "r") as f:
with open(self.config_file, "r", encoding="utf-8") as f:
config = json.load(f)
for i in config:
if i not in config_file_blacklist_keys:
Expand Down Expand Up @@ -108,7 +108,7 @@ def __load(self):
print("Blank config file created")

def save(self):
with open(self.config_file, "w") as f:
with open(self.config_file, "w", encoding="utf-8") as f:
config_dict = self.__dict__
# Don't save the config file name
config_file = self.config_file
Expand Down

0 comments on commit a75dd83

Please sign in to comment.