A feature-rich command-line audio/video downloader
utils.py: Workaround TypeError with Python 2.7.13 in Windows
Ricardo Constantino2f49bcd69076
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.pyindex a81fe7d30c..1279a9042f 100644--- a/youtube_dl/utils.py+++ b/youtube_dl/utils.py@@ -1684,6 +1684,11 @@ def setproctitle(title):libc = ctypes.cdll.LoadLibrary('libc.so.6')except OSError:return+ except TypeError:+ # LoadLibrary in Windows Python 2.7.13 only expects+ # a bytestring, but since unicode_literals turns+ # every string into a unicode string, it fails.+ returntitle_bytes = title.encode('utf-8')buf = ctypes.create_string_buffer(len(title_bytes))buf.value = title_bytes