diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-17 16:25:03 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-12-17 16:25:03 +0100 |
commit | 80d3177e5c07c4970e7cebcf2b38dcdf1e289786 (patch) | |
tree | 905f38bb59b87cf7c5fbc5af078492d251d49e8c /youtube_dl/FileDownloader.py | |
parent | 5e5ddcfbcf62d975e46ffaa0aaee8744f70913e1 (diff) |
various py3 fixes; all tests green on 3.3
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r-- | youtube_dl/FileDownloader.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index b43acd19b..61d3654e2 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -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() |