summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-07 10:11:08 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-07 10:11:01 -0700
commit2280d3bf987f0b002b00d031f997fbc30ff85770 (patch)
tree0b75432ccead2ba8e031d832a8d1dc528e6a0925
parent628ea99ae3cc83dac8cbe241fd17ca2cb82242cd (diff)
downloadportage-2280d3bf987f0b002b00d031f997fbc30ff85770.tar.gz
portage-2280d3bf987f0b002b00d031f997fbc30ff85770.tar.bz2
portage-2280d3bf987f0b002b00d031f997fbc30ff85770.zip
Calculate maxretries before len(ips) changes.
-rw-r--r--pym/_emerge/actions.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index c768edd13..2f0c0756a 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2117,6 +2117,10 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
# reverse, for use with pop()
ips.reverse()
+ effective_maxretries = maxretries
+ if effective_maxretries < 0:
+ effective_maxretries = len(ips)
+
SERVER_OUT_OF_DATE = -1
EXCEEDED_MAX_RETRIES = -2
while (1):
@@ -2142,9 +2146,6 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
if "--quiet" not in myopts:
print(">>> Starting rsync with "+dosyncuri+"...")
else:
- effective_maxretries = maxretries
- if effective_maxretries < 0:
- effective_maxretries = len(ips)
emergelog(xterm_titles,
">>> Starting retry %d of %d with %s" % \
(retries, effective_maxretries, dosyncuri))