From 80d3177e5c07c4970e7cebcf2b38dcdf1e289786 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Mon, 17 Dec 2012 16:25:03 +0100 Subject: various py3 fixes; all tests green on 3.3 --- youtube_dl/FileDownloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube_dl/FileDownloader.py') 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() -- cgit v1.2.3