Index: client/tests/kvm/scripts/unattended.py |
diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py |
index ba7d80b4df22324edb804d000317303eeabe8fd6..1029d1eb5e84bf4b6536843dee304453bda5c57a 100755 |
--- a/client/tests/kvm/scripts/unattended.py |
+++ b/client/tests/kvm/scripts/unattended.py |
@@ -276,14 +276,16 @@ class UnattendedInstall(object): |
if not os.path.isdir(self.tftp): |
os.makedirs(self.tftp) |
- self.cdrom_cd1 = os.path.join(KVM_TEST_DIR, self.cdrom_cd1) |
+ if self.cdrom_cd1: |
+ self.cdrom_cd1 = os.path.join(KVM_TEST_DIR, self.cdrom_cd1) |
self.cdrom_cd1_mount = tempfile.mkdtemp(prefix='cdrom_cd1_', dir='/tmp') |
if self.medium == 'nfs': |
self.nfs_mount = tempfile.mkdtemp(prefix='nfs_', dir='/tmp') |
- self.floppy = os.path.join(KVM_TEST_DIR, self.floppy) |
- if not os.path.isdir(os.path.dirname(self.floppy)): |
- os.makedirs(os.path.dirname(self.floppy)) |
+ if self.floppy: |
+ self.floppy = os.path.join(KVM_TEST_DIR, self.floppy) |
+ if not os.path.isdir(os.path.dirname(self.floppy)): |
+ os.makedirs(os.path.dirname(self.floppy)) |
self.image_path = KVM_TEST_DIR |
self.kernel_path = os.path.join(self.image_path, self.kernel) |