summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPhil Wise <phil@advancedtelematic.com>2017-12-01 11:04:56 +0100
committerPhil Wise <phil@advancedtelematic.com>2017-12-01 11:04:56 +0100
commitfba014fd897e938a130d1229929839c7930bc671 (patch)
tree005e9f3bccc1b611cff848cff91b2c547570d8d6 /scripts
parent99b470ec4535f62eb909dfba1c6fef66dd17965d (diff)
downloadmeta-updater-fba014fd897e938a130d1229929839c7930bc671.tar.gz
Add a hint when machine autodetection fails
Also fix a pylint warning about indentation
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qemucommand.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py
index 82a9540..9a893d8 100644
--- a/scripts/qemucommand.py
+++ b/scripts/qemucommand.py
@@ -46,7 +46,7 @@ class QemuCommand(object):
46 if len(machines) == 1: 46 if len(machines) == 1:
47 self.machine = machines[0] 47 self.machine = machines[0]
48 else: 48 else:
49 raise ValueError("Could not autodetect machine type from %s" % args.dir) 49 raise ValueError("Could not autodetect machine type. More than one entry in %s. Maybe --machine qemux86-64?" % args.dir)
50 if args.efi: 50 if args.efi:
51 self.bios = 'OVMF.fd' 51 self.bios = 'OVMF.fd'
52 else: 52 else:
@@ -118,10 +118,9 @@ class QemuCommand(object):
118 118
119 def img_command_line(self): 119 def img_command_line(self):
120 cmdline = [ 120 cmdline = [
121 "qemu-img", "create", 121 "qemu-img", "create",
122 "-o", "backing_file=%s" % self.image, 122 "-o", "backing_file=%s" % self.image,
123 "-f", "qcow2", 123 "-f", "qcow2",
124 self.overlay] 124 self.overlay]
125 return cmdline 125 return cmdline
126 126
127