mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-13 13:02:00 +00:00
ipa[server,replica,client]: flake8 and pylint fixes
These are white space and line length changes to calm down pylint and flake8.
This commit is contained in:
@@ -26,11 +26,12 @@ from ipapython.version import NUM_VERSION, VERSION
|
||||
|
||||
if NUM_VERSION < 30201:
|
||||
# See ipapython/version.py
|
||||
IPA_MAJOR,IPA_MINOR,IPA_RELEASE = [ int(x) for x in VERSION.split(".", 2) ]
|
||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in VERSION.split(".", 2)]
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
||||
else:
|
||||
IPA_PYTHON_VERSION = NUM_VERSION
|
||||
|
||||
|
||||
class installer_obj(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
@@ -38,20 +39,20 @@ class installer_obj(object):
|
||||
def set_logger(self, logger):
|
||||
self.logger = logger
|
||||
|
||||
#def __getattribute__(self, attr):
|
||||
# def __getattribute__(self, attr):
|
||||
# value = super(installer_obj, self).__getattribute__(attr)
|
||||
# if not attr.startswith("--") and not attr.endswith("--"):
|
||||
# logger.debug(
|
||||
# " <-- Accessing installer.%s (%s)" % (attr, repr(value)))
|
||||
# return value
|
||||
|
||||
#def __getattr__(self, attr):
|
||||
# #logger.info(" --> ADDING missing installer.%s" % attr)
|
||||
# def __getattr__(self, attr):
|
||||
# # logger.info(" --> ADDING missing installer.%s" % attr)
|
||||
# self.logger.warn(" --> ADDING missing installer.%s" % attr)
|
||||
# setattr(self, attr, None)
|
||||
# return getattr(self, attr)
|
||||
|
||||
#def __setattr__(self, attr, value):
|
||||
# def __setattr__(self, attr, value):
|
||||
# logger.debug(" --> Setting installer.%s to %s" % (attr, repr(value)))
|
||||
# return super(installer_obj, self).__setattr__(attr, value)
|
||||
|
||||
@@ -59,6 +60,7 @@ class installer_obj(object):
|
||||
for name in self.__dict__:
|
||||
yield self, name
|
||||
|
||||
|
||||
# Initialize installer settings
|
||||
installer = installer_obj()
|
||||
# Create options
|
||||
@@ -174,10 +176,13 @@ if NUM_VERSION >= 40400:
|
||||
else:
|
||||
get_ca_cert = None
|
||||
get_ca_certs = ipa_client_install.get_ca_certs
|
||||
SECURE_PATH = ("/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin")
|
||||
SECURE_PATH = ("/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:"
|
||||
"/usr/bin:/usr/sbin")
|
||||
|
||||
get_server_connection_interface = ipa_client_install.get_server_connection_interface
|
||||
configure_nsswitch_database = ipa_client_install.configure_nsswitch_database
|
||||
get_server_connection_interface = \
|
||||
ipa_client_install.get_server_connection_interface
|
||||
configure_nsswitch_database = \
|
||||
ipa_client_install.configure_nsswitch_database
|
||||
disable_ra = ipa_client_install.disable_ra
|
||||
client_dns = ipa_client_install.client_dns
|
||||
configure_certmonger = ipa_client_install.configure_certmonger
|
||||
@@ -250,7 +255,7 @@ def ansible_module_get_parsed_ip_addresses(ansible_module,
|
||||
if ip_addresses is None:
|
||||
return None
|
||||
|
||||
ip_addrs = [ ]
|
||||
ip_addrs = []
|
||||
for ip in ip_addresses:
|
||||
try:
|
||||
ip_parsed = ipautil.CheckedIPAddress(ip)
|
||||
|
||||
Reference in New Issue
Block a user