Skip to content

Commit

Permalink
tests/acceptance/virtiofs_submounts.py: evaluate string not length
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
clebergnu authored and jnsnow committed Jun 1, 2021
1 parent f084e14 commit c028691
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/acceptance/virtiofs_submounts.py
Expand Up @@ -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')

Expand Down

0 comments on commit c028691

Please sign in to comment.