From: Cleber Rosa Date: Mon, 12 Apr 2021 04:46:35 +0000 (-0400) Subject: tests/acceptance/virtiofs_submounts.py: evaluate string not length X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c028691e65b9f45e7a8ff8ffbfb9a3818478b572;p=qemu.git tests/acceptance/virtiofs_submounts.py: evaluate string not length If the vmlinuz variable is set to anything that evaluates to True, then the respective arguments should be set. If the variable contains an empty string, than it will evaluate to False, and the extra arguments will not be set. This keeps the same logic, but improves readability a bit. Signed-off-by: Cleber Rosa Reviewed-by: Beraldo Leal Reviewed-by: Eric Auger Reviewed-by: Willian Rampazzo Message-Id: <20210412044644.55083-3-crosa@redhat.com> Signed-off-by: John Snow --- diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py index 5b74ce2929..ca64b76301 100644 --- a/tests/acceptance/virtiofs_submounts.py +++ b/tests/acceptance/virtiofs_submounts.py @@ -251,7 +251,7 @@ class VirtiofsSubmountsTest(LinuxTest): super(VirtiofsSubmountsTest, self).setUp(pubkey) - if len(vmlinuz) > 0: + if vmlinuz: self.vm.add_args('-kernel', vmlinuz, '-append', 'console=ttyS0 root=/dev/sda1')