[yum-commits] urlgrabber/grabber.py urlgrabber/mirror.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Mon Jun 17 06:45:59 UTC 2013
urlgrabber/grabber.py | 2 +-
urlgrabber/mirror.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 872b563096b1128135795a84642c6ee4f6c1de06
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Jun 17 08:41:22 2013 +0200
max_connections=0 to use the default limit
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index b5960a3..74178d7 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -2286,7 +2286,7 @@ def parallel_wait(meter=None):
# update the current mirror and limit
key = best['mirror']
- limit = best.get('kwargs', {}).get('max_connections', 2)
+ limit = best.get('kwargs', {}).get('max_connections') or 2
opts.async = key, limit
# update URL and proxy
diff --git a/urlgrabber/mirror.py b/urlgrabber/mirror.py
index 7975f1b..5d3aa34 100644
--- a/urlgrabber/mirror.py
+++ b/urlgrabber/mirror.py
@@ -77,7 +77,8 @@ CUSTOMIZATION
kwargs are omitted, then (duh) they will not be used.
kwarg 'max_connections' limits the number of concurrent
- connections to this mirror.
+ connections to this mirror. When omitted or set to zero,
+ the default limit (2) will be used.
3) Pass keyword arguments when instantiating the mirror group.
See, for example, the failure_callback argument.
More information about the Yum-commits
mailing list