[yum-commits] urlgrabber/grabber.py
skvidal at osuosl.org
skvidal at osuosl.org
Thu Nov 12 15:51:38 UTC 2009
urlgrabber/grabber.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 5b30b5e625097bd02ab350f95b8ab7c788c35117
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Nov 12 10:50:21 2009 -0500
- fix URLGRABBER_DEBUG calls by adding a _ function back - need to talk
to gettext/ngettext to properly fix it.
- make sure we reset the size and look for the right message to reset the header
when we are redirected.
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index fc28922..044d0ad 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -439,6 +439,12 @@ try:
except:
__version__ = '???'
+try:
+ # this part isn't going to do much - need to talk to gettext
+ from i18n import _
+except ImportError, msg:
+ def _(st): return st
+
########################################################################
# functions for debugging output. These functions are here because they
# are also part of the module initialization.
@@ -1116,8 +1122,10 @@ class PyCurlFileObject():
self.scheme = urlparse.urlsplit(location)[0]
self.url = location
- if len(self._hdr_dump) != 0 and buf == '\n\n':
+ if len(self._hdr_dump) != 0 and buf == '\r\n':
self._hdr_ended = True
+ self.size = 0
+ if DEBUG: DEBUG.info('header reset:')
return len(buf)
except KeyboardInterrupt:
More information about the Yum-commits
mailing list