aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-24 02:09:13 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-24 02:09:51 +0700
commit19f3821821ada01fbf9b466402bc1d0366b3edb2 (patch)
tree40eef354fe177886b3a31020bf432f42db6dbf60
parent8e1409fd805b3b5e3731da66a2101494643a06ea (diff)
downloadyoutube-dl-19f3821821ada01fbf9b466402bc1d0366b3edb2.zip
youtube-dl-19f3821821ada01fbf9b466402bc1d0366b3edb2.tar.gz
youtube-dl-19f3821821ada01fbf9b466402bc1d0366b3edb2.tar.bz2
[devscripts/make_lazy_extractors] Fix making lazy extractors on python 3 under Windows
-rw-r--r--devscripts/make_lazy_extractors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py
index 19114d3..0a1762d 100644
--- a/devscripts/make_lazy_extractors.py
+++ b/devscripts/make_lazy_extractors.py
@@ -1,6 +1,7 @@
from __future__ import unicode_literals, print_function
from inspect import getsource
+import io
import os
from os.path import dirname as dirn
import sys
@@ -95,5 +96,5 @@ module_contents.append(
module_src = '\n'.join(module_contents) + '\n'
-with open(lazy_extractors_filename, 'wt') as f:
+with io.open(lazy_extractors_filename, 'wt', encoding='utf-8') as f:
f.write(module_src)