mirror of https://github.com/flaggo/pydu.git
update note to download
This commit is contained in:
parent
6e48699ff1
commit
b33a3dfc13
|
@ -66,6 +66,7 @@ class FileName(object):
|
|||
return dst or cls.from_headers(headers) or cls.from_url(url)
|
||||
|
||||
|
||||
# http://bitbucket.org/techtonik/python-wget/
|
||||
def download(url, dst=None):
|
||||
"""
|
||||
High level function, which downloads URL into tmp file in current
|
||||
|
@ -100,7 +101,6 @@ def download(url, dst=None):
|
|||
if dst_:
|
||||
filename = os.path.join(dst_, filename)
|
||||
|
||||
# add numeric ' (x)' suffix if filename already exists
|
||||
if os.path.exists(filename):
|
||||
os.unlink(filename)
|
||||
shutil.move(tmpfile, filename)
|
||||
|
|
Loading…
Reference in New Issue