From 806ee05e44dba0983169b23af5b9dc93f8a9a61c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 16:05:21 +0000 Subject: import python-urlgrabber-3.10-7.el7 --- diff --git a/SOURCES/BZ-1233329-timedhosts-parsing-error-handling.patch b/SOURCES/BZ-1233329-timedhosts-parsing-error-handling.patch new file mode 100644 index 0000000..20db29d --- /dev/null +++ b/SOURCES/BZ-1233329-timedhosts-parsing-error-handling.patch @@ -0,0 +1,24 @@ +commit 7644d090e186c44d577f8d06de57bd815e0dc8b0 +Author: Valentina Mukhamedzhanova +Date: Tue Jun 23 10:00:12 2015 +0200 + + Don't crash on timedhosts parsing error. BZ#1233329 + +diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py +index 91cdbdd..f09d4a5 100644 +--- a/urlgrabber/grabber.py ++++ b/urlgrabber/grabber.py +@@ -2377,8 +2377,11 @@ class _TH: + try: + now = int(time.time()) + for line in open(filename): +- host, speed, fail, ts = line.rsplit(' ', 3) +- _TH.hosts[host] = int(speed), int(fail), min(int(ts), now) ++ try: ++ host, speed, fail, ts = line.rsplit(' ', 3) ++ _TH.hosts[host] = int(speed), int(fail), min(int(ts), now) ++ except ValueError: ++ if DEBUG: DEBUG.info('Error parsing timedhosts: line "%s"', line) + except IOError: pass + _TH.dirty = False + diff --git a/SPECS/python-urlgrabber.spec b/SPECS/python-urlgrabber.spec index e84e036..6227e2a 100644 --- a/SPECS/python-urlgrabber.spec +++ b/SPECS/python-urlgrabber.spec @@ -3,7 +3,7 @@ Summary: A high-level cross-protocol url-grabber Name: python-urlgrabber Version: 3.10 -Release: 6%{?dist} +Release: 7%{?dist} Source0: http://urlgrabber.baseurl.org/download/urlgrabber-%{version}.tar.gz Patch1: BZ-853432-single-conn-reset.patch Patch2: BZ-1017491-respond-to-ctrl-c.patch @@ -12,6 +12,9 @@ Patch2: BZ-1017491-respond-to-ctrl-c.patch Patch10: BZ-1099101-revert-curl-ctrl-c.patch Patch11: BZ-1082648-curl-77-error-message.patch +# rhel-7.2 +Patch20: BZ-1233329-timedhosts-parsing-error-handling.patch + License: LGPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -35,6 +38,9 @@ authentication, proxies and more. %patch10 -p1 %patch11 -p1 +# rhel-7.2 +%patch20 -p1 + %build python setup.py build @@ -54,6 +60,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_libexecdir}/urlgrabber-ext-down %changelog +* Tue Jun 30 2015 Valentina Mukhamedzhanova - 3.10-7 +- Don't crash on timedhosts parsing error. +- Resolves: bug#1233329 + * Wed Sep 24 2014 Valentina Mukhamedzhanova - 3.10-6 - Add a comprehensive error message to curl error 77. - Resolves: bug#1082648