Skip to content

Commit 4d004f3

Browse files
committed
boot-qemu.py: Combine an else + if into elif
As recently pointed out by ruff: boot-qemu.py:684:9: PLR5501 Consider using `elif` instead of `else` then `if` to remove one indentation level Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent a5ecf73 commit 4d004f3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

boot-qemu.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,10 @@ def get_qemu_args(cfg):
678678
qemu_args += ["-cpu", kvm_cpu]
679679
qemu_args += ["-enable-kvm"]
680680
qemu_args += ["-smp", str(smp_value)]
681-
else:
682-
# By default, we do not use '-smp' with TCG for performance reasons.
683-
# Only add it if the user explicitly requested it.
684-
if smp_requested:
685-
qemu_args += ["-smp", str(smp_value)]
681+
# By default, we do not use '-smp' with TCG for performance reasons.
682+
# Only add it if the user explicitly requested it.
683+
elif smp_requested:
684+
qemu_args += ["-smp", str(smp_value)]
686685

687686
# Other miscellaneous options
688687
qemu_args += ["-display", "none"]

0 commit comments

Comments
 (0)