From 184b72f6b706036aeda88d52ecb0e0c27b1573fe Mon Sep 17 00:00:00 2001 From: Richard Elias Date: Wed, 28 Feb 2018 16:16:31 +0000 Subject: python: Pylint 1.8.2 code conformity Updated master Python scripts to conform to the newer pylint 1.8.2 standard. JIRA: VSPERF-563 Change-Id: I19305a008a2e22c2f4841aa83fed85fbdc2d549c Signed-off-by: Richard Elias Reviewed-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao --- tools/networkcard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/networkcard.py') diff --git a/tools/networkcard.py b/tools/networkcard.py index 2cd296fb..758010d2 100644 --- a/tools/networkcard.py +++ b/tools/networkcard.py @@ -191,7 +191,7 @@ def get_mac(pci_handle): """ mac_path = glob.glob(os.path.join(_PCI_DIR, _PCI_NET, '*', 'address').format(pci_handle)) # kernel driver is loaded and MAC can be read - if len(mac_path) and os.path.isfile(mac_path[0]): + if mac_path and os.path.isfile(mac_path[0]): with open(mac_path[0], 'r') as _file: return _file.readline().rstrip('\n') -- cgit 1.2.3-korg