Skip to content

Commit

Permalink
Remove sha256 file only if present.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyplo committed May 8, 2016
1 parent 15de207 commit 6bce110
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/bootstrap/bootstrap.py
Expand Up @@ -33,11 +33,14 @@ def get(url, path, verbose=False):
print("moving " + temp_path + " to " + path)
shutil.move(temp_path, path)
finally:
print("removing " + sha_path)
os.unlink(sha_path)
if os.path.isfile(temp_path):
print("removing " + temp_path)
os.unlink(temp_path)
delete_if_present(sha_path)
delete_if_present(temp_path)


def delete_if_present(path):
if os.path.isfile(path):
print("removing " + path)
os.unlink(path)


def download(path, url, verbose):
Expand Down

0 comments on commit 6bce110

Please sign in to comment.