mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-08-29 09:49:33 +03:00
pylint: fix simplifiable-if-statement issue
pylint complain: The if statement can be replaced with 'var = bool(test)' Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
This commit is contained in:
committed by
Cole Robinson
parent
c83e083dde
commit
70f9817bdc
@ -604,10 +604,8 @@ class Guest(XMLBuilder):
|
||||
usb2 = False
|
||||
usb3 = False
|
||||
if self.os.is_x86():
|
||||
if self.osinfo.supports_usb3() and qemu_usb3:
|
||||
usb3 = True
|
||||
else:
|
||||
usb2 = True
|
||||
usb3 = bool(self.osinfo.supports_usb3() and qemu_usb3)
|
||||
usb2 = not usb3
|
||||
elif self.os.is_arm_machvirt():
|
||||
# For machvirt, we always assume OS supports usb3
|
||||
if (qemu_usb3 and
|
||||
|
Reference in New Issue
Block a user