summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-21 15:49:34 +0530
committerSebastian Dröge <slomo@coaxion.net>2018-11-09 08:27:18 +0000
commit968e9303b4745cbbe56b00cf1ac3a3c68e392d2e (patch)
treec7fb3f424fd44837c70d373d779dcf02e9482a27
parentf2a9fef288f70be63e2ee0c48a05e0d6dc2c9d2c (diff)
cerbero: Don't try to remove non-existent downloads
Same code exists for wget and urllib2.
-rw-r--r--cerbero/utils/shell.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cerbero/utils/shell.py b/cerbero/utils/shell.py
index c4139834..59972c45 100644
--- a/cerbero/utils/shell.py
+++ b/cerbero/utils/shell.py
@@ -332,7 +332,8 @@ def download_curl(url, destination=None, recursive=False, check_cert=True, overw
try:
call(cmd, path)
except FatalError, e:
- os.remove(destination)
+ if os.path.exists(destination):
+ os.remove(destination)
raise e