summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <ovitters@mageia.org>2012-03-18 15:05:26 +0000
committerOlav Vitters <ovitters@mageia.org>2012-03-18 15:05:26 +0000
commit8488169b91d7621d29795c7e06469cfb8fa1d92d (patch)
tree00eb638ee97e32a4dd79ccc9ecdc3770d47ce73a
parentad600ea11f7e8d76090de15311fc07f259087c1d (diff)
downloadmgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar
mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.gz
mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.bz2
mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.xz
mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.zip
nicer repeat mgarepo sync logic
-rwxr-xr-xmgagnome8
1 files changed, 4 insertions, 4 deletions
diff --git a/mgagnome b/mgagnome
index 81205f4..5e27868 100755
--- a/mgagnome
+++ b/mgagnome
@@ -309,19 +309,19 @@ class SpecFile(object):
tries = 0
while tries < SLEEP_TIMES:
tries += 1
+ if tries > 1: time.sleep(SLEEP_REPEAT)
try:
# Download new tarball
subprocess.check_call(['mgarepo', 'sync', '-d'], cwd=self.cwd)
+ # success, so exit loop
break
except subprocess.CalledProcessError, e:
# mgarepo sync returns 1 if the tarball cannot be downloaded
if e.returncode != 1:
return False
+ else:
+ return False
- if tries == SLEEP_TIMES:
- return False
-
- time.sleep(SLEEP_REPEAT)
try:
# Check patches still apply