projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b531c0
)
Improve addinfourl_wrapper for compatibility with older Python versions
author
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Thu, 20 Jan 2011 19:36:42 +0000
(20:36 +0100)
committer
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Thu, 20 Jan 2011 19:36:42 +0000
(20:36 +0100)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index 1b20025e7d7ea91da1e3d9fccfe6d5a56e2c4b29..103189b21f1c317e058e91fa3f8a02056f6c70f1 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-193,7
+193,9
@@
class YoutubeDLHandler(urllib2.HTTPHandler):
def addinfourl_wrapper(stream, headers, url, code):
if hasattr(urllib2.addinfourl, 'getcode'):
return urllib2.addinfourl(stream, headers, url, code)
- return urllib2.addinfourl(stream, headers, url)
+ ret = urllib2.addinfourl(stream, headers, url)
+ ret.code = code
+ return ret
def http_request(self, req):
for h in std_headers: