From 357c65d44135b560b25e86ec33b1c1efccb0c7fa Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 9 Sep 2019 14:32:44 +0200 Subject: Print usage information after parameter checking. No use printing all that if there's a problem anyway. Signed-off-by: Patrick Vacek --- scripts/run-qemu-ota | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index 3312fd3..232ee11 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota @@ -55,12 +55,6 @@ def main(): print(e.message) sys.exit(1) - print("Launching %s with mac address %s" % (args.imagename, qemu_command.mac_address)) - print("To connect via SSH:") - print(" ssh -o StrictHostKeyChecking=no root@localhost -p %d" % qemu_command.ssh_port) - print("To connect to the serial console:") - print(" nc localhost %d" % qemu_command.serial_port) - cmdline = qemu_command.command_line() if args.overlay and not exists(args.overlay): print("Overlay file %s does not yet exist, creating." % args.overlay) @@ -70,6 +64,12 @@ def main(): else: Popen(img_cmdline).wait() + print("Launching %s with mac address %s" % (args.imagename, qemu_command.mac_address)) + print("To connect via SSH:") + print(" ssh -o StrictHostKeyChecking=no root@localhost -p %d" % qemu_command.ssh_port) + print("To connect to the serial console:") + print(" nc localhost %d" % qemu_command.serial_port) + if args.dry_run: print(" ".join(cmdline)) else: -- cgit v1.2.3-54-g00ecf