From 8121eba598d303dce18d3fc7da219aaf97bbb2fa Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Mon, 18 Jul 2022 07:46:12 +0000 Subject: [PATCH] pylint: Remove a few exception lint warnings --- vppcfg/vpp/vppapi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vppcfg/vpp/vppapi.py b/vppcfg/vpp/vppapi.py index 53c32fb..2317531 100644 --- a/vppcfg/vpp/vppapi.py +++ b/vppcfg/vpp/vppapi.py @@ -74,9 +74,9 @@ class VPPApi: self.vpp.connect(self.clientname) self.connected = True break - except Exception as e: + except ConnectionError as err: self.logger.warning( - f"Could not connect to VPP (attempt {i+1}/{retries}): {e}" + f"Could not connect to VPP (attempt {i+1}/{retries}): {err}" ) time.sleep(1) self.connected = False @@ -224,9 +224,9 @@ class VPPApi: ) self.cache["lcps"][lcp.phy_sw_if_index] = lcp self.lcp_enabled = True - except: + except AttributeError as err: self.logger.warning( - "linux-cp not found, will not reconcile Linux Control Plane" + f"linux-cp not found, will not reconcile Linux Control Plane: {err}" ) self.logger.debug("Retrieving interfaces")