diff options
author | Olav Vitters <ovitters@mageia.org> | 2012-03-18 15:05:26 +0000 |
---|---|---|
committer | Olav Vitters <ovitters@mageia.org> | 2012-03-18 15:05:26 +0000 |
commit | 8488169b91d7621d29795c7e06469cfb8fa1d92d (patch) | |
tree | 00eb638ee97e32a4dd79ccc9ecdc3770d47ce73a | |
parent | ad600ea11f7e8d76090de15311fc07f259087c1d (diff) | |
download | mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.gz mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.bz2 mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.tar.xz mgagnome-8488169b91d7621d29795c7e06469cfb8fa1d92d.zip |
nicer repeat mgarepo sync logic
-rwxr-xr-x | mgagnome | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |