summaryrefslogtreecommitdiff
path: root/ipsec
diff options
context:
space:
mode:
authorMark Gray <mark.d.gray@redhat.com>2020-12-23 11:01:33 -0500
committerIlya Maximets <i.maximets@ovn.org>2021-01-05 19:19:43 +0100
commitcafe492d768c5d9f919f26c768a7f96e30b43845 (patch)
tree8339882c0a37f0733819e91fd767094bd69cee58 /ipsec
parentbf8812cd7e20f9b87a74e658e68f3db8377a79fa (diff)
downloadopenvswitch-cafe492d768c5d9f919f26c768a7f96e30b43845.tar.gz
ovs-monitor-ipsec: Fix _nss_clear_database() parse error.
_nss_clear_database() runs `certutil` in order to get a list of certificates currently loaded in NSS. This fails with error: "ovs-monitor-ipsec | ERR | Failed to clear NSS database. startswith first arg must be bytes or a tuple of bytes, not str" Modify subprocess.Popen() to write in 'text' mode so that 'startwith' can correctly parse output. Signed-off-by: Mark Gray <mark.d.gray@redhat.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ipsec')
-rwxr-xr-xipsec/ovs-monitor-ipsec.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in
index b84608a55..5ae2ad5e1 100755
--- a/ipsec/ovs-monitor-ipsec.in
+++ b/ipsec/ovs-monitor-ipsec.in
@@ -657,7 +657,8 @@ conn prevent_unencrypted_vxlan
proc = subprocess.Popen(['certutil', '-L', '-d',
'sql:/etc/ipsec.d/'],
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE,
+ universal_newlines=True)
lines = proc.stdout.readlines()
for line in lines: