daca2: added --tries and --timeout in wget command

This commit is contained in:
Daniel Marjamäki 2014-01-02 16:50:12 +01:00
parent 2f91539d1d
commit cb40e83261
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ def wget(filepath):
if filepath.find('/') >= 0:
filename = filename[filename.rfind('/') + 1:]
for d in DEBIAN:
subprocess.call(['nice', 'wget', d + filepath])
subprocess.call(
['nice', 'wget', '--tries=10', '--timeout=300', d + filepath])
if os.path.isfile(filename):
return True
print('Sleep for 10 seconds..')