54 |
|
|
55 |
SLEEP_INITIAL=180 |
SLEEP_INITIAL=180 |
56 |
SLEEP_REPEAT=30 |
SLEEP_REPEAT=30 |
57 |
SLEEP_TIMES=20 |
SLEEP_TIMES=30 |
58 |
|
|
59 |
re_majmin = re.compile(r'^([0-9]+\.[0-9]+).*') |
re_majmin = re.compile(r'^([0-9]+\.[0-9]+).*') |
60 |
re_version = re.compile(r'([-.]|\d+|[^-.\d]+)') |
re_version = re.compile(r'([-.]|\d+|[^-.\d]+)') |
337 |
tries = 0 |
tries = 0 |
338 |
while tries < SLEEP_TIMES: |
while tries < SLEEP_TIMES: |
339 |
tries += 1 |
tries += 1 |
340 |
if tries > 1: time.sleep(SLEEP_REPEAT) |
if tries > 1: time.sleep(SLEEP_REPEAT * 2 ** (tries // 10)) |
341 |
try: |
try: |
342 |
# Download new tarball |
# Download new tarball |
343 |
subprocess.check_call(['mgarepo', 'sync', '-d'], cwd=self.cwd) |
subprocess.check_call(['mgarepo', 'sync', '-d'], cwd=self.cwd) |