On 10/10/2018 02:44 AM, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@xxxxxxxxx> pylint complain: The if statement can be replaced with 'var = bool(test)' Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx> --- virtinst/guest.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/virtinst/guest.py b/virtinst/guest.py index 2de4dc96..c89a4eac 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -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
Thanks, pushed now - Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list