Omit code argument in addinfourl for Python 2.4
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 18 Jan 2011 18:16:42 +0000 (19:16 +0100)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 18 Jan 2011 18:16:42 +0000 (19:16 +0100)
youtube-dl

index 443bb211bd4b996222b2ad62c15e5dcae227aa8d..8bdde1704075be5e2667c594be96798f32b038ef 100755 (executable)
@@ -205,12 +205,12 @@ class YoutubeDLHandler(urllib2.HTTPHandler):
                # gzip
                if resp.headers.get('Content-encoding', '') == 'gzip':
                        gz = gzip.GzipFile(fileobj=StringIO.StringIO(resp.read()), mode='r')
-                       resp = urllib2.addinfourl(gz, old_resp.headers, old_resp.url, old_resp.code)
+                       resp = urllib2.addinfourl(gz, old_resp.headers, old_resp.url)
                        resp.msg = old_resp.msg
                # deflate
                if resp.headers.get('Content-encoding', '') == 'deflate':
                        gz = StringIO.StringIO(self.deflate(resp.read()))
-                       resp = urllib2.addinfourl(gz, old_resp.headers, old_resp.url, old_resp.code)
+                       resp = urllib2.addinfourl(gz, old_resp.headers, old_resp.url)
                        resp.msg = old_resp.msg
                return resp