From d78e6a68461190f4bb4cb369ebb192d893f813e1 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Mon, 29 Jul 2019 14:29:01 +0200 Subject: Fix logic error in AVF compatibility check Change-Id: I7f1b47725648c8c26e21f42c305395ad620beea6 Signed-off-by: Vratko Polak --- resources/libraries/python/InterfaceUtil.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'resources/libraries/python') diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 4531ff3f01..898d7fe9ae 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1526,10 +1526,11 @@ class InterfaceUtil(object): pf_mac_addr = Topology.get_interface_mac(node, ifc_key).split(":") uio_driver = Topology.get_uio_driver(node) kernel_driver = Topology.get_interface_driver(node, ifc_key) - if kernel_driver != "i40e" or kernel_driver != "i40evf": + if kernel_driver not in ("i40e", "i40evf"): raise RuntimeError( - "AVF needs i40e driver, not {driver} at node {host} ifc {ifc}"\ - .format(driver=kernel_driver, host=node["host"], ifc=ifc_key)) + "AVF needs i40e-compatible driver, not {driver} at node {host}" + " ifc {ifc}".format( + driver=kernel_driver, host=node["host"], ifc=ifc_key)) current_driver = DUTSetup.get_pci_dev_driver( node, pf_pci_addr.replace(':', r'\:')) -- cgit 1.2.3-korg