diff options
author | sstrehla <slawomir.strehlau@intel.com> | 2020-11-30 10:34:46 +0100 |
---|---|---|
committer | sstrehla <slawomir.strehlau@intel.com> | 2020-12-01 17:13:35 +0100 |
commit | fcb9b3f7f41c9d02e28be691ea4fea710f2bd9bb (patch) | |
tree | 0bd06eee78dc0ae96b5a6ab19067a8d8c6239610 /3rd_party/ovs_pmd_stats | |
parent | 508d79cc25bc84396322bde054310b0d804fb6b7 (diff) |
ovs_pmd_stats: bugfix for excessive padding with ovs-vswitchd 2.14.99.
Added "strip" call to remove excessive whitespace padding from values
Removed trailing newline
Signed-off-by: Slawomir Strehlau <slawomir.strehlau@intel.com>
Change-Id: I49686d239fcf105a03b2fa1131a506537f2dfe13
Diffstat (limited to '3rd_party/ovs_pmd_stats')
-rwxr-xr-x | 3rd_party/ovs_pmd_stats/ovs_pmd_stats.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/3rd_party/ovs_pmd_stats/ovs_pmd_stats.py b/3rd_party/ovs_pmd_stats/ovs_pmd_stats.py index fc6045b9..b706bcd5 100755 --- a/3rd_party/ovs_pmd_stats/ovs_pmd_stats.py +++ b/3rd_party/ovs_pmd_stats/ovs_pmd_stats.py @@ -101,9 +101,8 @@ for el in array: plugin_instance = el[:-1].replace(' ', '_') else: type_instance = el.split(':')[0].replace(' ', "_") - value = el.split(':')[1].split(' ')[0] + value = el.split(':')[1].strip().split(' ')[0] print('PUTVAL %s/%s-%s/%s-%s N:%s' % (HOSTNAME, PROG_NAME, plugin_instance, TYPE, type_instance, value)) # close socket sock.close() - |