diff options
-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 |