From 16b8d62968194a07e3811cac0b2886f9879a2c7e Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 14 Feb 2011 18:12:10 -0500 Subject: Fix two problems with ipa-replica-prepare 1. Fix a unicode() problem creating the DNS entries 2. Fix a strange NSS error when generating the certificates against a dogtag server. The NSS errors are quite strange. When generating the first certificate nss_shutdown() fails because the database isn't initialized yet but nss_is_initialized() returned True. The second pass fails because something is in use. --- ipapython/nsslib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ipapython/nsslib.py') diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py index 129f1a0c5..fad65a373 100644 --- a/ipapython/nsslib.py +++ b/ipapython/nsslib.py @@ -126,7 +126,11 @@ class NSSConnection(httplib.HTTPConnection): if nss.nss_is_initialized(): # close any open NSS database and use the new one ssl.clear_session_cache() - nss.nss_shutdown() + try: + nss.nss_shutdown() + except NSPRError, e: + # FIXME: errors shouldn't be raised here + logging.debug('nss_shutdown: %s', str(e)) nss.nss_init(dbdir) ssl.set_domestic_policy() nss.set_password_callback(self.password_callback) -- cgit