mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixing tox and pylint errors
Fixing import errors introduced by commits
icac3475a0454b730d6e5b2093c2e63d395acd387 and
0b7d9c5.
https://pagure.io/freeipa/issue/7132
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
+6
-6
@@ -55,10 +55,6 @@ from ipalib.constants import (
|
||||
TLS_VERSIONS, TLS_VERSION_MINIMAL, TLS_HIGH_CIPHERS
|
||||
)
|
||||
from ipalib.text import _
|
||||
# pylint: disable=ipa-forbidden-import
|
||||
from ipalib.install import sysrestore
|
||||
from ipaplatform.paths import paths
|
||||
# pylint: enable=ipa-forbidden-import
|
||||
from ipapython.ssh import SSHPublicKey
|
||||
from ipapython.dn import DN, RDN
|
||||
from ipapython.dnsutil import DNSName
|
||||
@@ -68,6 +64,9 @@ from ipapython.admintool import ScriptError
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
_IPA_CLIENT_SYSRESTORE = "/var/lib/ipa-client/sysrestore"
|
||||
_IPA_DEFAULT_CONF = "/etc/ipa/default.conf"
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1078,8 +1077,9 @@ def check_client_configuration():
|
||||
"""
|
||||
Check if IPA client is configured on the system.
|
||||
"""
|
||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||
if not fstore.has_files() and not os.path.exists(paths.IPA_DEFAULT_CONF):
|
||||
if (not os.path.isfile(_IPA_DEFAULT_CONF) or
|
||||
not os.path.isdir(_IPA_CLIENT_SYSRESTORE) or
|
||||
not os.listdir(_IPA_CLIENT_SYSRESTORE)):
|
||||
raise ScriptError('IPA client is not configured on this system')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user