summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall/tools/ipa-replica-prepare2
-rw-r--r--ipapython/nsslib.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index 1b643099e..f0661a378 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -267,7 +267,7 @@ def main():
if not options.ip_address:
try:
- api.Command['dns_resolve'](replica_fqdn)
+ api.Command['dns_resolve'](replica_fqdn.decode('utf-8'))
except errors.NotFound:
sys.exit("Neither an A nor AAAA record for host '%s' does not exist in DNS.\nUse the --ip-address option to add DNS entries for the replica." % replica_fqdn)
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)