aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi/vpp_stats.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/python/vpp_papi/vpp_stats.py')
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_stats.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py
index 590549a17bd..3638892135f 100644
--- a/src/vpp-api/python/vpp_papi/vpp_stats.py
+++ b/src/vpp-api/python/vpp_papi/vpp_stats.py
@@ -86,7 +86,7 @@ char *stat_segment_index_to_name_r (uint32_t index, stat_client_main_t * sm);
uint64_t stat_segment_version(void);
uint64_t stat_segment_version_r(stat_client_main_t *sm);
void free(void *ptr);
-""")
+""") # noqa: E501
# Utility functions
@@ -130,12 +130,14 @@ def combined_counter_vec_list(api, e):
vec.append(if_per_thread)
return vec
+
def error_vec_list(api, e):
vec = []
for thread in range(api.stat_segment_vec_len(e)):
vec.append(e[thread])
return vec
+
def name_vec_list(api, e):
return [ffi.string(e[i]).decode('utf-8') for i in
range(api.stat_segment_vec_len(e)) if e[i] != ffi.NULL]
@@ -175,7 +177,7 @@ class VPPStatsIOError(IOError):
if not message:
try:
message = self.message % kwargs
- except Exception as e:
+ except Exception:
message = self.message
else:
message = message % kwargs
@@ -258,7 +260,7 @@ class VPPStats(object):
.format(name))
k, v = s.popitem()
return v
- except VPPStatsIOError as e:
+ except VPPStatsIOError:
if retries > 10:
return None
retries += 1
@@ -280,7 +282,7 @@ class VPPStats(object):
error_names = self.ls(['/err/'])
error_counters = self.dump(error_names)
break
- except VPPStatsIOError as e:
+ except VPPStatsIOError:
if retries > 10:
return None
retries += 1