Private GIT

Skip to content
Snippets Groups Projects
Commit 71c6541c authored by miigotu's avatar miigotu
Browse files

Must use binary mode with bytestrings, or unicode with text mode for io

parent dbadd07c
Branches
Tags
No related merge requests found
...@@ -321,7 +321,7 @@ class TIVOMetadata(generic.GenericMetadata): ...@@ -321,7 +321,7 @@ class TIVOMetadata(generic.GenericMetadata):
logger.log(u"Writing episode nfo file to " + nfo_file_path, logger.DEBUG) logger.log(u"Writing episode nfo file to " + nfo_file_path, logger.DEBUG)
with io.open(nfo_file_path, 'w') as nfo_file: with io.open(nfo_file_path, 'wb') as nfo_file:
# Calling encode directly, b/c often descriptions have wonky characters. # Calling encode directly, b/c often descriptions have wonky characters.
nfo_file.write(data.encode("utf-8")) nfo_file.write(data.encode("utf-8"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment