mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 14:24:03 -07:00
Fix TypeError for Python 2.7.x
This commit is contained in:
parent
cdb3076445
commit
70e9b6fd47
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue