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:
Chen Hanxiao
2018-10-10 14:44:00 +08:00
committed by Cole Robinson
parent c83e083dde
commit 70f9817bdc

View File

@ -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