X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FDUTSetup.py;h=9d0a3a8ff7c98b8f6a5de0c43bb5e6710ffb6904;hp=504022381e4696355d17a07f41e3b9b56c2e585b;hb=bd15bb418bf618ff3055fb25c339778d12c1eaef;hpb=68f8548a9769aa55de77176c58e9e70bd1a88742 diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py index 504022381e..9d0a3a8ff7 100644 --- a/resources/libraries/python/DUTSetup.py +++ b/resources/libraries/python/DUTSetup.py @@ -408,11 +408,11 @@ class DUTSetup: # sriov is not supported and we want 0 VFs # no need to do anything return - else: - raise RuntimeError( - f"Can't configure {numvfs} VFs on {pf_pci_addr} device " - f"on {node[u'host']} since it doesn't support SR-IOV." - ) + + raise RuntimeError( + f"Can't configure {numvfs} VFs on {pf_pci_addr} device " + f"on {node[u'host']} since it doesn't support SR-IOV." + ) pci = pf_pci_addr.replace(u":", r"\:") command = f"sh -c \"echo {numvfs} | " \ @@ -572,10 +572,9 @@ class DUTSetup: # the directory doesn't exist which means the device is not bound # to any driver return None - else: - cmd = f"basename $(readlink -f {driver_path})" - ret_val, _ = exec_cmd_no_error(node, cmd) - return ret_val.strip() + cmd = f"basename $(readlink -f {driver_path})" + ret_val, _ = exec_cmd_no_error(node, cmd) + return ret_val.strip() @staticmethod def verify_kernel_module(node, module, force_load=False):