Small change for FreeIPA < 4.0 compatibility.

This commit is contained in:
Erinn Looney-Triggs 2015-04-08 20:33:38 -06:00
parent 1e7f7bfc12
commit a3b35ed1a6

View file

@ -13,7 +13,11 @@ def initialize():
api.bootstrap(context='cli')
api.finalize()
api.Backend.xmlclient.connect()
try:
api.Backend.rpcclient.connect()
except AttributeError:
#FreeIPA < 4.0 compatibility
api.Backend.xmlclient.connect()
return api