Skip to content

Commit

Permalink
Use UTF-8 encoding for file IO
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman committed Feb 12, 2021
1 parent 95f7d26 commit 86bf54f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PlexAniSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import plexmodule
import graphql

__version__ = "1.3.7"
__version__ = "1.3.8"

# Logger settings
LOG_FILENAME = "PlexAniSync.log"
Expand Down
2 changes: 1 addition & 1 deletion TautulliSyncHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import plexmodule
import graphql

__version__ = "1.3.7"
__version__ = "1.3.8"

# Logger settings
logger = logging.getLogger("PlexAniSync")
Expand Down
2 changes: 1 addition & 1 deletion anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def int_to_roman_numeral(decimal: int) -> str:


def log_to_file(message: str):
file = open("failed_matches.txt", "a+")
file = open("failed_matches.txt", "a+", encoding="utf-8")
file.write(f"{message}\n")
file.close()

Expand Down
2 changes: 1 addition & 1 deletion custom_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_custom_mappings():
logger.info(f"[MAPPING] Custom map file not found: {MAPPING_FILE}")
else:
logger.info(f"[MAPPING] Custom map file found: {MAPPING_FILE}")
file = open(MAPPING_FILE, "r")
file = open(MAPPING_FILE, "r", encoding="utf-8")
yaml = YAML(typ='safe')
file_mappings = yaml.load(file)

Expand Down

0 comments on commit 86bf54f

Please sign in to comment.