diff options
-rw-r--r-- | ipa-client/ipaclient/ipa_certupdate.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ipa-client/ipaclient/ipa_certupdate.py b/ipa-client/ipaclient/ipa_certupdate.py index c25dcaed8..fd6c80df8 100644 --- a/ipa-client/ipaclient/ipa_certupdate.py +++ b/ipa-client/ipaclient/ipa_certupdate.py @@ -20,6 +20,7 @@ import os import tempfile import shutil +import urlparse from ipapython import (admintool, ipautil, ipaldap, sysrestore, dogtag, certmonger, certdb) @@ -50,10 +51,7 @@ class CertUpdate(admintool.AdminTool): api.bootstrap(context='cli_installer') api.finalize() - try: - server = api.env.server - except AttributeError: - server = api.env.host + server = urlparse.urlsplit(api.env.jsonrpc_uri).hostname ldap = ipaldap.IPAdmin(server) tmpdir = tempfile.mkdtemp(prefix="tmp-") |