summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Baker <tyler.baker@linaro.org>2015-03-30 22:33:04 (GMT)
committerTyler Baker <tyler.baker@linaro.org>2015-03-30 22:41:44 (GMT)
commitae2aa93a9656116469307ae72f1e311b0254e96f (patch)
treebfc220412b8f0f45980aca46d1ddfcb7bf24b493
parent3beb3d44ba4139c47793602da3d28bd840623d78 (diff)
downloadlava-dispatcher-ae2aa93a9656116469307ae72f1e311b0254e96f.tar.gz
lava-dispatcher-ae2aa93a9656116469307ae72f1e311b0254e96f.tar.xz
qemu: avoid None objects by using the scratch_dir property instead of accessing directly
Change-Id: I30393d974acbab7c0941c48e70b370ca3d5087f6
-rw-r--r--lava_dispatcher/device/qemu.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lava_dispatcher/device/qemu.py b/lava_dispatcher/device/qemu.py
index 60b8b97..d4212ea 100644
--- a/lava_dispatcher/device/qemu.py
+++ b/lava_dispatcher/device/qemu.py
@@ -88,15 +88,16 @@ class QEMUTarget(Target):
self._kernel = download_image(kernel, self.context)
if ramdisk is not None:
- ramdisk = download_image(ramdisk, self.context)
+ ramdisk = download_image(ramdisk, self.context,
+ decompress=False)
if modules is not None:
modules = download_image(modules, self.context,
- self._scratch_dir,
+ self.scratch_dir,
decompress=False)
- ramdisk_dir = extract_ramdisk(ramdisk, self._scratch_dir,
+ ramdisk_dir = extract_ramdisk(ramdisk, self.scratch_dir,
is_uboot=self._is_uboot_ramdisk(ramdisk))
extract_modules(modules, ramdisk_dir)
- ramdisk = create_ramdisk(ramdisk_dir, self._scratch_dir)
+ ramdisk = create_ramdisk(ramdisk_dir, self.scratch_dir)
self._ramdisk = ramdisk
if rootfs is None:
logging.debug("Attempting to set deployment data")