From a3b35ed1a6e46f2f63f08476400d94026d92e2b8 Mon Sep 17 00:00:00 2001 From: Erinn Looney-Triggs Date: Wed, 8 Apr 2015 20:33:38 -0600 Subject: [PATCH] Small change for FreeIPA < 4.0 compatibility. --- plugins/inventory/freeipa.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/inventory/freeipa.py b/plugins/inventory/freeipa.py index caf336239cc..05a8dba356a 100755 --- a/plugins/inventory/freeipa.py +++ b/plugins/inventory/freeipa.py @@ -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