From fba014fd897e938a130d1229929839c7930bc671 Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Fri, 1 Dec 2017 11:04:56 +0100 Subject: Add a hint when machine autodetection fails Also fix a pylint warning about indentation --- scripts/qemucommand.py | 11 +++++------ 1 file 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): if len(machines) == 1: self.machine = machines[0] else: - raise ValueError("Could not autodetect machine type from %s" % args.dir) + raise ValueError("Could not autodetect machine type. More than one entry in %s. Maybe --machine qemux86-64?" % args.dir) if args.efi: self.bios = 'OVMF.fd' else: @@ -118,10 +118,9 @@ class QemuCommand(object): def img_command_line(self): cmdline = [ - "qemu-img", "create", - "-o", "backing_file=%s" % self.image, - "-f", "qcow2", - self.overlay] + "qemu-img", "create", + "-o", "backing_file=%s" % self.image, + "-f", "qcow2", + self.overlay] return cmdline - -- cgit v1.2.3-54-g00ecf