_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 <[email protected]> --- ipsec/ovs-monitor-ipsec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in index b84608a55d8a..903e6bc4aaf0 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, + text=True) lines = proc.stdout.readlines() for line in lines: -- 2.26.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
