mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 08:51:50 -06:00
Get server hostname from jsonrpc_uri in ipa-certupdate
https://fedorahosted.org/freeipa/ticket/3259 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
9ab402c495
commit
4e68046751
@ -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-")
|
||||
|
Loading…
Reference in New Issue
Block a user