From e418762753ef0e643b6c0ff1ed42fbed5559c6aa Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Tue, 26 Nov 2019 15:35:55 -0500 Subject: [PATCH] Conditionally import nss python-nss does not exist (and is not needed) in RHEL8. We need to conditionally import nss to avoid errors in RHEL8. Change-Id: I699fbfab4c2106f24260c99905b1bd40a8e683a8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1758771 --- novajoin/configure_ipa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/novajoin/configure_ipa.py b/novajoin/configure_ipa.py index 0430d50..6a67546 100644 --- a/novajoin/configure_ipa.py +++ b/novajoin/configure_ipa.py @@ -52,8 +52,6 @@ except ImportError: if version.NUM_VERSION >= 40500: from cryptography.hazmat.primitives import serialization -import nss.nss as nss - logger = logging.getLogger() allowed_chars = string.ascii_letters + string.digits @@ -171,6 +169,8 @@ class NovajoinRole(object): NOTE: For IPA v4.4.0. """ + import nss.nss as nss + nss.nss_init_nodb() nss_db = certdb.NSSDatabase()