various py3 fixes; all tests green on 3.3
This commit is contained in:
parent
5e5ddcfbcf
commit
80d3177e5c
2 changed files with 10 additions and 10 deletions
|
@ -453,9 +453,9 @@ 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:
|
||||
infof = open(encodeFilename(infofn), 'wb')
|
||||
infof = open(encodeFilename(infofn), 'w')
|
||||
try:
|
||||
json_info_dict = dict((k,v) for k,v in info_dict.iteritems() if not k in ('urlhandle',))
|
||||
json_info_dict = dict((k, info_dict[k]) for k in info_dict if not k in ['urlhandle'])
|
||||
json.dump(json_info_dict, infof)
|
||||
finally:
|
||||
infof.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue