diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-10-07 10:11:08 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-10-07 10:11:08 -0700 |
commit | b08f0a8b346cc40fdb9485ffef7f279886bca46b (patch) | |
tree | b724094f8a68e027cdd97f4552e61e477d3a9d09 | |
parent | 59b1c6e1d2f6010ffac296aae26955437a5b3b76 (diff) | |
download | portage-b08f0a8b346cc40fdb9485ffef7f279886bca46b.tar.gz portage-b08f0a8b346cc40fdb9485ffef7f279886bca46b.tar.bz2 portage-b08f0a8b346cc40fdb9485ffef7f279886bca46b.zip |
Calculate maxretries before len(ips) changes.
-rw-r--r-- | pym/_emerge/actions.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index d064facd1..2aabb25b3 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2127,6 +2127,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): @@ -2152,9 +2156,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)) |