From 693ac709644483c8d3a3b3f00ff18937f5229723 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 27 Jan 2021 12:26:00 -0500 Subject: [PATCH] Report the NSS database directory if it cannot be opened If the system lacks DBM support and an older database is opened then an exception is raised. Include the directory in the exception so it is clearer which database cannot be opened. https://pagure.io/freeipa/issue/8675 Signed-off-by: Rob Crittenden Reviewed-By: Christian Heimes Reviewed-By: Stanislav Levin --- ipapython/certdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipapython/certdb.py b/ipapython/certdb.py index 8e0faffdd..8a05aaff9 100644 --- a/ipapython/certdb.py +++ b/ipapython/certdb.py @@ -265,7 +265,8 @@ class NSSDatabase: if dbtype == "dbm" and not nss_supports_dbm(): raise ValueError( - "NSS is built without support of the legacy database(DBM)" + f"NSS is built without support of the legacy database(DBM) " + f"directory '{nssdir}'", ) if nssdir is None: