[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/44] tests/acceptance/virtiofs_submounts.py: evaluate string not
From: |
John Snow |
Subject: |
[PULL 03/44] tests/acceptance/virtiofs_submounts.py: evaluate string not length |
Date: |
Thu, 27 May 2021 22:31:39 -0400 |
From: Cleber Rosa <crosa@redhat.com>
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 <crosa@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210412044644.55083-3-crosa@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/acceptance/virtiofs_submounts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/acceptance/virtiofs_submounts.py
b/tests/acceptance/virtiofs_submounts.py
index 5b74ce2929b..ca64b76301f 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -251,7 +251,7 @@ def setUp(self):
super(VirtiofsSubmountsTest, self).setUp(pubkey)
- if len(vmlinuz) > 0:
+ if vmlinuz:
self.vm.add_args('-kernel', vmlinuz,
'-append', 'console=ttyS0 root=/dev/sda1')
--
2.31.1
- [PULL 00/44] Python patches, John Snow, 2021/05/27
- [PULL 01/44] Python: expose QEMUMachine's temporary directory, John Snow, 2021/05/27
- [PULL 02/44] tests/acceptance/virtiofs_submounts.py: add missing accel tag, John Snow, 2021/05/27
- [PULL 03/44] tests/acceptance/virtiofs_submounts.py: evaluate string not length,
John Snow <=
- [PULL 04/44] Python: add utility function for retrieving port redirection, John Snow, 2021/05/27
- [PULL 05/44] Acceptance Tests: move useful ssh methods to base class, John Snow, 2021/05/27
- [PULL 06/44] Acceptance Tests: add port redirection for ssh by default, John Snow, 2021/05/27
- [PULL 07/44] Acceptance Tests: make username/password configurable, John Snow, 2021/05/27
- [PULL 08/44] Acceptance Tests: set up SSH connection by default after boot for LinuxTest, John Snow, 2021/05/27
- [PULL 09/44] tests/acceptance/virtiofs_submounts.py: remove launch_vm(), John Snow, 2021/05/27
- [PULL 10/44] Acceptance Tests: add basic documentation on LinuxTest base class, John Snow, 2021/05/27
- [PULL 11/44] Acceptance Tests: introduce CPU hotplug test, John Snow, 2021/05/27
- [PULL 12/44] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey, John Snow, 2021/05/27
- [PULL 14/44] python/console_socket: avoid one-letter variable, John Snow, 2021/05/27