From 5e7be479eacd4d1085cab152c35dcb6433a146ed Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Thu, 26 Apr 2018 15:15:51 +0200 Subject: Fix various pylint 1.5.4 warnings + DUTSetup.py:424 Else clause on loop without a break statement + InterfaceUtil.py:400 Else clause on loop without a break statement + QemuUtils.py:564 Wrong continued indentation + SetupDPDKTest.py: Locally enabling broad-except + VatExecutor.py: Catching too general exception Exception + ssh.py:95 No exception type(s) specified. + HTTPRequest.py: Tolerate HTTPCodes.OK + multiple: Drop ":returns: None" from docstrings. There are still several warnings present: - R0902(too-many-instance-attributes) - R0912(too-many-branches) - R0913(too-many-arguments) - R0914(too-many-locals) - R0915(too-many-statements) - R0401(cyclic-import) And there are multiple blocks of similar lines, mainly across various Setup*Test.py files: - R0801(duplicate-code) Change-Id: I582575cb52b85d69d268e6374852f6e74bb71052 Signed-off-by: Vratko Polak --- resources/libraries/python/InterfaceUtil.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'resources/libraries/python/InterfaceUtil.py') diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index c0a8957935..aac78c9e44 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -316,7 +316,6 @@ class InterfaceUtil(object): :type node: dict :type pci_addr: str :type driver: str - :returns: None. :raises RuntimeError: If unbinding from the current driver fails. :raises RuntimeError: If binding to the new driver fails. """ @@ -397,9 +396,8 @@ class InterfaceUtil(object): return None if name == 'Driver:': return value if value else None - else: - raise RuntimeError('Get interface driver for: {0}' - .format(pci_addr)) + raise RuntimeError('Get interface driver for: {0}' + .format(pci_addr)) @staticmethod def tg_set_interfaces_udev_rules(node): -- cgit 1.2.3-korg