reduce repetition in download retry
This commit is contained in:
@@ -51,7 +51,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
|
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
|
||||||
|
|
||||||
# get latest pip once and for all
|
# get latest pip once and for all
|
||||||
for _ in range(10):
|
for _ in range(3):
|
||||||
try:
|
try:
|
||||||
call(['curl', '-L', '-o', get_pip_script, get_pip_url])
|
call(['curl', '-L', '-o', get_pip_script, get_pip_url])
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
dest_dir = os.path.dirname(dest)
|
dest_dir = os.path.dirname(dest)
|
||||||
if not os.path.exists(dest_dir):
|
if not os.path.exists(dest_dir):
|
||||||
os.makedirs(dest_dir)
|
os.makedirs(dest_dir)
|
||||||
for _ in range(10):
|
for _ in range(3):
|
||||||
try:
|
try:
|
||||||
response = urlopen(url)
|
response = urlopen(url)
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user