mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-03-16 04:52:22 +09:00
Fix TypeError for Python 2.7.x
This commit is contained in:
parent
cdb3076445
commit
70e9b6fd47
@ -454,7 +454,7 @@ class FileDownloader(object):
|
||||
self.trouble(u'ERROR: No JSON encoder found. Update to Python 2.6+, setup a json module, or leave out --write-info-json.')
|
||||
return
|
||||
try:
|
||||
with io.open(encodeFilename(infofn), 'w', 'utf-8') as infof:
|
||||
with io.open(encodeFilename(infofn), 'wb') as infof:
|
||||
json_info_dict = dict((k, v) for k,v in info_dict.items() if not k in ['urlhandle'])
|
||||
json.dump(json_info_dict, infof)
|
||||
except (OSError, IOError):
|
||||
|
Loading…
Reference in New Issue
Block a user