mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
client: Fix ca_is_enabled calls
The command was added in API version 2.107. Old IPA servers may crash with NetworkError on ca_is_enabled, handle this case gracefully. https://fedorahosted.org/freeipa/ticket/4565 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
ad77613be6
commit
6e672109ea
@ -2641,10 +2641,10 @@ def install(options, env, fstore, statestore):
|
|||||||
try:
|
try:
|
||||||
result = api.Backend.rpcclient.forward(
|
result = api.Backend.rpcclient.forward(
|
||||||
'ca_is_enabled',
|
'ca_is_enabled',
|
||||||
version=u'2.0',
|
version=u'2.107',
|
||||||
)
|
)
|
||||||
ca_enabled = result['result']
|
ca_enabled = result['result']
|
||||||
except errors.CommandError:
|
except (errors.CommandError, errors.NetworkError):
|
||||||
result = api.Backend.rpcclient.forward(
|
result = api.Backend.rpcclient.forward(
|
||||||
'env',
|
'env',
|
||||||
server=True,
|
server=True,
|
||||||
|
@ -63,10 +63,10 @@ class CertUpdate(admintool.AdminTool):
|
|||||||
try:
|
try:
|
||||||
result = api.Backend.rpcclient.forward(
|
result = api.Backend.rpcclient.forward(
|
||||||
'ca_is_enabled',
|
'ca_is_enabled',
|
||||||
version=u'2.0',
|
version=u'2.107',
|
||||||
)
|
)
|
||||||
ca_enabled = result['result']
|
ca_enabled = result['result']
|
||||||
except errors.CommandError:
|
except (errors.CommandError, errors.NetworkError):
|
||||||
result = api.Backend.rpcclient.forward(
|
result = api.Backend.rpcclient.forward(
|
||||||
'env',
|
'env',
|
||||||
server=True,
|
server=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user