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
This commit is contained in:
parent
4aa08a25b8
commit
e418762753
|
@ -52,8 +52,6 @@ except ImportError:
|
||||||
if version.NUM_VERSION >= 40500:
|
if version.NUM_VERSION >= 40500:
|
||||||
from cryptography.hazmat.primitives import serialization
|
from cryptography.hazmat.primitives import serialization
|
||||||
|
|
||||||
import nss.nss as nss
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
allowed_chars = string.ascii_letters + string.digits
|
allowed_chars = string.ascii_letters + string.digits
|
||||||
|
@ -171,6 +169,8 @@ class NovajoinRole(object):
|
||||||
|
|
||||||
NOTE: For IPA v4.4.0.
|
NOTE: For IPA v4.4.0.
|
||||||
"""
|
"""
|
||||||
|
import nss.nss as nss
|
||||||
|
|
||||||
nss.nss_init_nodb()
|
nss.nss_init_nodb()
|
||||||
nss_db = certdb.NSSDatabase()
|
nss_db = certdb.NSSDatabase()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue