[yum-commits] 3 commits - urlgrabber/grabber.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Tue Oct 8 08:21:04 UTC 2013
urlgrabber/grabber.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit fe7114389b42622673bd6ae7e7e60d6884b2175e
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Tue Oct 8 10:14:36 2013 +0200
Fix the condition to enter single-connection mode
- handles limit==0, limit==None cases correctly
- prevents duplicated logging
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 9ebb06f..069dab9 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -2216,8 +2216,8 @@ def parallel_wait(meter=None):
if ug_err is None:
continue
- if limit > 1 and ug_err.errno in (pycurl.E_OPERATION_TIMEOUTED,
- pycurl.E_COULDNT_CONNECT):
+ if key not in single and ug_err.errno in (pycurl.E_OPERATION_TIMEOUTED,
+ pycurl.E_COULDNT_CONNECT):
# One possible cause is connection-limited server.
# Turn on the max_connections=1 override. BZ 853432
if DEBUG: DEBUG.info('max_connections(%s) %s => 1', key, limit)
commit 38e535b8972fb9537c96957ff4b67bc6f414eef5
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Tue Oct 8 10:07:21 2013 +0200
Fix traceback when limit==None and DEBUG is on
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index fa6fe69..9ebb06f 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -2220,7 +2220,7 @@ def parallel_wait(meter=None):
pycurl.E_COULDNT_CONNECT):
# One possible cause is connection-limited server.
# Turn on the max_connections=1 override. BZ 853432
- if DEBUG: DEBUG.info('max_connections(%s) %d => 1', key, limit)
+ if DEBUG: DEBUG.info('max_connections(%s) %s => 1', key, limit)
single.add(key)
retry = opts.retry or 0
@@ -2327,7 +2327,7 @@ def parallel_wait(meter=None):
while host_con.get(key, 0) >= (limit or 2):
perform()
if DEBUG:
- DEBUG.info('max_connections(%s): %d/%d', key, host_con.get(key, 0), limit)
+ DEBUG.info('max_connections(%s): %d/%s', key, host_con.get(key, 0), limit)
start(opts, 1)
except IOError, e:
commit d08486ff0a13e017351604de71db32f0961a6f0c
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Tue Oct 8 09:51:41 2013 +0200
Fix traceback when entering single-connection mode with DEBUG off
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 9252977..fa6fe69 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -2220,7 +2220,7 @@ def parallel_wait(meter=None):
pycurl.E_COULDNT_CONNECT):
# One possible cause is connection-limited server.
# Turn on the max_connections=1 override. BZ 853432
- DEBUG.info('max_connections(%s) %d => 1', key, limit)
+ if DEBUG: DEBUG.info('max_connections(%s) %d => 1', key, limit)
single.add(key)
retry = opts.retry or 0
More information about the Yum-commits
mailing list