From 6e3f133aeec7e1a0ccc1b2b061635b6a503a87a8 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Thu, 14 Sep 2017 13:35:07 +0200 Subject: [PATCH] library/ipafstore.py: Compatibilty to ipa 4.4 and later, new version check --- library/ipafstore.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/ipafstore.py b/library/ipafstore.py index e9f30cfd..c6bc34b7 100644 --- a/library/ipafstore.py +++ b/library/ipafstore.py @@ -52,7 +52,13 @@ RETURN = ''' ''' from ansible.module_utils.basic import AnsibleModule -from ipalib.install import sysrestore +from ipapython.version import NUM_VERSION, VERSION +if NUM_VERSION < 40400: + raise Exception, "freeipa version '%s' is too old" % VERSION +try: + from ipalib.install import sysrestore +except ImportError: + from ipapython import sysrestore from ipaplatform.paths import paths def main(): -- GitLab