From c3eb32049516e3c6be3148acdcd73b9903adb7a8 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Fri, 19 Feb 2010 19:56:39 +0000 Subject: [PATCH] add urlgrabber-reset and rebuild --- python-urlgrabber.spec | 7 ++++++- urlgrabber-reset.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 urlgrabber-reset.patch diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index 5fdd189..f11df81 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -3,9 +3,10 @@ Summary: A high-level cross-protocol url-grabber Name: python-urlgrabber Version: 3.9.1 -Release: 4%{?dist} +Release: 5%{?dist} Source0: urlgrabber-%{version}.tar.gz Patch1: urlgrabber-HEAD.patch +Patch2: urlgrabber-reset.patch License: LGPLv2+ Group: Development/Libraries @@ -24,6 +25,7 @@ authentication, proxies and more. %prep %setup -q -n urlgrabber-%{version} %patch1 -p1 +%patch2 -p1 %build python setup.py build @@ -43,6 +45,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/urlgrabber %changelog +* Fri Feb 19 2010 Seth Vidal - 3.9.1-5 +- add patch to allow reset_curl_obj() to close and reload the cached curl obj + * Thu Nov 12 2009 Seth Vidal - 3.9.1-4 - reset header values when we redirect and make sure debug output will work diff --git a/urlgrabber-reset.patch b/urlgrabber-reset.patch new file mode 100644 index 0000000..b63e7c3 --- /dev/null +++ b/urlgrabber-reset.patch @@ -0,0 +1,15 @@ +--- a/urlgrabber/grabber.py 2010-02-19 14:50:45.000000000 -0500 ++++ b/urlgrabber/grabber.py 2010-02-19 14:51:28.000000000 -0500 +@@ -1626,6 +1626,12 @@ + + _curl_cache = pycurl.Curl() # make one and reuse it over and over and over + ++def reset_curl_obj(): ++ """To make sure curl has reread the network/dns info we force a reload""" ++ global _curl_cache ++ _curl_cache.close() ++ _curl_cache = pycurl.Curl() ++ + + ##################################################################### + # DEPRECATED FUNCTIONS