library/ipafstore.py: Compatibilty to ipa 4.4 and later, new version check

This commit is contained in:
Thomas Woerner
2017-09-14 13:35:07 +02:00
parent 56063ae373
commit 6e3f133aee

View File

@@ -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():