[yum-commits] urlgrabber/grabber.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Mar 25 15:38:55 UTC 2011
urlgrabber/grabber.py | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 79e4fafab4f5325d9f51dcee26ddc1a6b398c130
Author: Luke Macken <lmacken at redhat.com>
Date: Fri Mar 25 11:38:41 2011 -0400
Decode URLs to UTF8 before passing them to PyCurl to avoid errors
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 219a391..e2cd5c9 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -957,6 +957,7 @@ class URLGrabber(object):
returned that supports them. The file object can be treated
like any other file object.
"""
+ url = _to_utf8(url)
opts = self.opts.derive(**kwargs)
if DEBUG: DEBUG.debug('combined options: %s' % repr(opts))
(url,parts) = opts.urlparser.parse(url, opts)
@@ -970,6 +971,7 @@ class URLGrabber(object):
urlgrab returns the filename of the local file, which may be
different from the passed-in filename if copy_local == 0.
"""
+ url = _to_utf8(url)
opts = self.opts.derive(**kwargs)
if DEBUG: DEBUG.debug('combined options: %s' % repr(opts))
(url,parts) = opts.urlparser.parse(url, opts)
@@ -1030,6 +1032,7 @@ class URLGrabber(object):
"I want the first N bytes" but rather 'read the whole file
into memory, but don't use too much'
"""
+ url = _to_utf8(url)
opts = self.opts.derive(**kwargs)
if DEBUG: DEBUG.debug('combined options: %s' % repr(opts))
(url,parts) = opts.urlparser.parse(url, opts)
More information about the Yum-commits
mailing list