Skip to content
Snippets Groups Projects
Commit 56063ae3 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

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

freeipa 4.4 is the first version that supports all needed functions.
Therefore a check has been added to make sure that ipadiscovery fails for
versions before 4.4.

The python bindings of ipa versions before 4.6 are having a different
structure.
parent 4f06e9df
No related branches found
No related tags found
No related merge requests found
...@@ -162,9 +162,16 @@ if NUM_VERSION < 30201: ...@@ -162,9 +162,16 @@ if NUM_VERSION < 30201:
else: else:
IPA_PYTHON_VERSION = NUM_VERSION IPA_PYTHON_VERSION = NUM_VERSION
from ipapython.dn import DN from ipapython.dn import DN
from ipaplatform.paths import paths
try:
from ipaclient.install import ipadiscovery from ipaclient.install import ipadiscovery
except ImportError:
from ipaclient import ipadiscovery
try:
from ipalib.install.sysrestore import SYSRESTORE_STATEFILE from ipalib.install.sysrestore import SYSRESTORE_STATEFILE
from ipaplatform.paths import paths except ImportError:
from ipapython.sysrestore import SYSRESTORE_STATEFILE
def get_cert_path(cert_path): def get_cert_path(cert_path):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment