(filepath)
| 20 | 'ftp://ftp.debian.org/debian/') |
| 21 | |
| 22 | def wget(filepath): |
| 23 | filename = filepath |
| 24 | if '/' in filepath: |
| 25 | filename = filename[filename.rfind('/') + 1:] |
| 26 | for d in DEBIAN: |
| 27 | # TODO: handle exitcode? |
| 28 | subprocess.call( |
| 29 | ['nice', 'wget', '--tries=10', '--timeout=300', '-O', filename, d + filepath]) |
| 30 | if os.path.isfile(filename): |
| 31 | return True |
| 32 | print('Sleep for 10 seconds..') |
| 33 | time.sleep(10) |
| 34 | return False |
| 35 | |
| 36 | |
| 37 | def latestvername(names): |