summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHedayat Vatankhah <hedayat.fwd@gmail.com>2011-05-13 13:49:31 +0430
committerHedayat Vatankhah <hedayat.fwd@gmail.com>2011-05-13 13:49:31 +0430
commit8b9f59673067cfa9ac52fbead70d37d8e5b2aa77 (patch)
tree030c9a3cb6ff998a1ddde9572e032a8d739560a7
parent9229028c213760dbc4610b6276d2fcf793f00b05 (diff)
downloadyum-fast-downloader-8b9f59673067cfa9ac52fbead70d37d8e5b2aa77.tar.gz
yum-fast-downloader-8b9f59673067cfa9ac52fbead70d37d8e5b2aa77.tar.xz
yum-fast-downloader-8b9f59673067cfa9ac52fbead70d37d8e5b2aa77.zip
Put URLS at the end of the command line
-rw-r--r--yum-fast-downloader.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yum-fast-downloader.py b/yum-fast-downloader.py
index f5f2dd2..682c43c 100644
--- a/yum-fast-downloader.py
+++ b/yum-fast-downloader.py
@@ -46,14 +46,15 @@ def _getAria2CArgs(urls, remote_path, local_path, proxies = None):
args = downloader_common_args['aria2c']
args.append("--out={0}".format(os.path.basename(local_path)))
args.append("--dir={0}".format(os.path.dirname(local_path)))
- for url in urls:
- args.append(url + remote_path)
args.append("--split={0}".format(max(5, len(urls))))
-
if proxies:
for (scheme, proxy) in proxies.items():
if not proxy.startswith('ftp://'):
args.append("--{0}-proxy={1}".format(scheme, proxy))
+
+ for url in urls:
+ args.append(url + remote_path)
+
return args;
def downloadFile(urls, remote_path, local_path, proxies = None):