summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2016-08-31 11:33:26 (GMT)
committerNeil Williams <neil.williams@linaro.org>2016-09-01 12:41:05 (GMT)
commit9bdc893a1dd97212e84ba9301a263022140bdc4d (patch)
tree4914171b26728678cb30c1e1b541af6cb4189590
parentfa466751221a6341f5f9f8cc30dd3a32865bf6ef (diff)
downloadlava-dispatcher-9bdc893a1dd97212e84ba9301a263022140bdc4d.tar.gz
lava-dispatcher-9bdc893a1dd97212e84ba9301a263022140bdc4d.tar.xz
download: don't expand the path when retrying
Change-Id: I28edef2d7fef64706c8db0082f76f8f0588950dc
-rw-r--r--lava_dispatcher/pipeline/actions/deploy/download.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lava_dispatcher/pipeline/actions/deploy/download.py b/lava_dispatcher/pipeline/actions/deploy/download.py
index 34a128e..8f0af59 100644
--- a/lava_dispatcher/pipeline/actions/deploy/download.py
+++ b/lava_dispatcher/pipeline/actions/deploy/download.py
@@ -152,14 +152,8 @@ class DownloadHandler(Action): # pylint: disable=too-many-instance-attributes
compression = self.parameters[self.key].get('compression', False)
fname, _ = self._url_to_fname_suffix(self.path, compression)
-
if os.path.exists(fname):
- nested_tmp_dir = os.path.join(self.path, self.key)
- if os.path.exists(nested_tmp_dir):
- self.logger.warning("Cleaning up existing directory: %s", nested_tmp_dir)
- shutil.rmtree(nested_tmp_dir)
- os.makedirs(nested_tmp_dir)
- fname = os.path.join(nested_tmp_dir, os.path.basename(fname))
+ os.remove(fname)
decompressor = None
if compression: