]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional/aarch64/test_smmu: Silence warning from pylint
authorThomas Huth <thuth@redhat.com>
Thu, 13 Nov 2025 12:47:14 +0000 (13:47 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 12 Jan 2026 12:53:32 +0000 (13:53 +0100)
Pylint thinks that the accel variable might be used here without
being set first, since it does not know that skipTest() never
returns. Thus initialize "accel = None" here to make it happy.

Message-Id: <20251119082636.43286-14-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/functional/aarch64/test_smmu.py

index e0f4a922176a3774f7a36b456604ad2825742049..87b9b14e7a5c1b3256b875e7dc99e4daf6ecfcfb 100755 (executable)
@@ -50,6 +50,7 @@ class SMMU(LinuxKernelTest):
         elif kvm_available(self.qemu_bin):
             accel = "kvm"
         else:
+            accel = None        # for keeping pylint happy
             self.skipTest("Neither HVF nor KVM accelerator is available")
         self.require_accelerator(accel)
         self.require_netdev('user')