aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorIvan Kozik <ivan@ludios.org>2014-11-20 06:04:04 +0000
committerIvan Kozik <ivan@ludios.org>2014-11-20 06:26:34 +0000
commit61ee5aeb7363d16c16cdec0914ade78af1afd8fd (patch)
tree11c2c90e60b052057bf5dd80129ad512b283cd85 /youtube_dl
parent07e378fa18b1c6b8becd46f6cf2d476e29a70a59 (diff)
Fix UnicodeEncodeError with --write-info-json on Python 2.7 + Windows
Fixes #4244
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 94b496dd0..f339fcb31 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -74,7 +74,7 @@ def write_json_file(obj, fn):
""" Encode obj as JSON and write it to fn, atomically """
fn = encodeFilename(fn)
- if sys.version_info < (3, 0):
+ if sys.version_info < (3, 0) and sys.platform != 'win32':
encoding = get_filesystem_encoding()
# os.path.basename returns a bytes object, but NamedTemporaryFile
# will fail if the filename contains non ascii characters unless we