diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 9801f8a3e..cc7acd82f 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -822,10 +822,10 @@ class API(ReadOnly): class IPAHelpFormatter(optparse.IndentedHelpFormatter): - def format_epilog(self, text): + def format_epilog(self, epilog): text_width = self.width - self.current_indent indent = " " * self.current_indent - lines = text.splitlines() + lines = epilog.splitlines() result = '\n'.join( textwrap.fill(line, text_width, initial_indent=indent, subsequent_indent=indent) diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py index 2271cd20a..d63571b6a 100644 --- a/ipaplatform/redhat/tasks.py +++ b/ipaplatform/redhat/tasks.py @@ -513,14 +513,14 @@ class RedHatTaskNamespace(BaseTaskNamespace): """Tell systemd to reload config files""" ipautil.run([paths.SYSTEMCTL, "--system", "daemon-reload"]) - def configure_http_gssproxy_conf(self, ipaapi_user): + def configure_http_gssproxy_conf(self, ipauser): ipautil.copy_template_file( os.path.join(paths.USR_SHARE_IPA_DIR, 'gssproxy.conf.template'), paths.GSSPROXY_CONF, dict( HTTP_KEYTAB=paths.HTTP_KEYTAB, HTTPD_USER=constants.HTTPD_USER, - IPAAPI_USER=ipaapi_user, + IPAAPI_USER=ipauser, SWEEPER_SOCKET=paths.IPA_CCACHE_SWEEPER_GSSPROXY_SOCK, ) ) diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py index 53a1cfb14..ab212be4e 100644 --- a/ipapython/install/cli.py +++ b/ipapython/install/cli.py @@ -131,7 +131,9 @@ class ConfigureTool(admintool.AdminTool): raise NotImplementedError @classmethod - def add_options(cls, parser, positional=False): + def add_options( # pylint: disable=arguments-renamed + cls, parser, positional=False + ): transformed_cls = cls._transform(cls.configurable_class) if issubclass(transformed_cls, common.Interactive): diff --git a/ipaserver/dnssec/keysyncer.py b/ipaserver/dnssec/keysyncer.py index b965ec83d..249ad8fe2 100644 --- a/ipaserver/dnssec/keysyncer.py +++ b/ipaserver/dnssec/keysyncer.py @@ -76,46 +76,46 @@ class KeySyncer(SyncReplConsumer): return False return vals[0].startswith(b'dnssec-replica:') - def application_add(self, uuid, dn, newattrs): - objclass = self._get_objclass(newattrs) + def application_add(self, uuid, dn, attributes): + objclass = self._get_objclass(attributes) if objclass == b'idnszone': - self.zone_add(uuid, dn, newattrs) + self.zone_add(uuid, dn, attributes) elif objclass == b'idnsseckey': - self.key_meta_add(uuid, dn, newattrs) + self.key_meta_add(uuid, dn, attributes) elif objclass == b'ipk11publickey' and \ - self.__is_replica_pubkey(newattrs): + self.__is_replica_pubkey(attributes): self.hsm_master_sync() - def application_del(self, uuid, dn, oldattrs): - objclass = self._get_objclass(oldattrs) + def application_del(self, uuid, dn, previous_attributes): + objclass = self._get_objclass(previous_attributes) if objclass == b'idnszone': - self.zone_del(uuid, dn, oldattrs) + self.zone_del(uuid, dn, previous_attributes) elif objclass == b'idnsseckey': - self.key_meta_del(uuid, dn, oldattrs) + self.key_meta_del(uuid, dn, previous_attributes) elif objclass == b'ipk11publickey' and \ - self.__is_replica_pubkey(oldattrs): + self.__is_replica_pubkey(previous_attributes): self.hsm_master_sync() - def application_sync(self, uuid, dn, newattrs, oldattrs): - objclass = self._get_objclass(oldattrs) + def application_sync(self, uuid, dn, attributes, previous_attributes): + objclass = self._get_objclass(previous_attributes) if objclass == b'idnszone': - olddn = ldap.dn.str2dn(oldattrs['dn']) - newdn = ldap.dn.str2dn(newattrs['dn']) + olddn = ldap.dn.str2dn(previous_attributes['dn']) + newdn = ldap.dn.str2dn(attributes['dn']) assert olddn == newdn, 'modrdn operation is not supported' - oldval = self.__get_signing_attr(oldattrs) - newval = self.__get_signing_attr(newattrs) + oldval = self.__get_signing_attr(previous_attributes) + newval = self.__get_signing_attr(attributes) if oldval != newval: - if self.__is_dnssec_enabled(newattrs): - self.zone_add(uuid, olddn, newattrs) + if self.__is_dnssec_enabled(attributes): + self.zone_add(uuid, olddn, attributes) else: - self.zone_del(uuid, olddn, oldattrs) + self.zone_del(uuid, olddn, previous_attributes) elif objclass == b'idnsseckey': - self.key_metadata_sync(uuid, dn, oldattrs, newattrs) + self.key_metadata_sync(uuid, dn, previous_attributes, attributes) elif objclass == b'ipk11publickey' and \ - self.__is_replica_pubkey(newattrs): + self.__is_replica_pubkey(attributes): self.hsm_master_sync() def syncrepl_refreshdone(self): diff --git a/ipaserver/dnssec/syncrepl.py b/ipaserver/dnssec/syncrepl.py index 67305b7f7..44abc1f09 100644 --- a/ipaserver/dnssec/syncrepl.py +++ b/ipaserver/dnssec/syncrepl.py @@ -48,8 +48,8 @@ class SyncReplConsumer(ReconnectLDAPObject, SyncreplConsumer): logger.debug('New cookie is: %s', cookie) self.__data['cookie'] = cookie - def syncrepl_entry(self, dn, attributes, uuid): - attributes = cidict(attributes) + def syncrepl_entry(self, dn, attrs, uuid): + attributes = cidict(attrs) # First we determine the type of change we have here # (and store away the previous data for later if needed) previous_attributes = cidict() diff --git a/ipaserver/install/ipa_subids.py b/ipaserver/install/ipa_subids.py index 2b33b6670..1537047c3 100644 --- a/ipaserver/install/ipa_subids.py +++ b/ipaserver/install/ipa_subids.py @@ -52,7 +52,7 @@ class IPASubids(AdminTool): help="Dry run mode.", ) - def validate_options(self, neends_root=False): + def validate_options(self, needs_root=False): super().validate_options(needs_root=True) opt = self.safe_options diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index 4dac82c4f..9486047bb 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -214,10 +214,10 @@ class command(metaobject): ), ) - def _iter_params(self, cmd): - for arg in cmd.args(): + def _iter_params(self, metaobj): + for arg in metaobj.args(): yield arg - for option in cmd.options(): + for option in metaobj.options(): if option.name == 'version': continue yield option @@ -412,8 +412,8 @@ class topic_(MetaObject): else: topic.pop('topic_topic', None) - def _get_obj(self, topic, **kwargs): - return topic + def _get_obj(self, obj, **kwargs): + return obj def _retrieve(self, full_name, **kwargs): self.__make_topics() @@ -564,8 +564,8 @@ class param(BaseParam): def parent(self): return self.api.Object.metaobject - def _get_obj(self, metaobj_param, **kwargs): - metaobj, param = metaobj_param + def _get_obj(self, obj, **kwargs): + metaobj, param = obj obj = dict() obj['name'] = unicode(param.name) @@ -693,8 +693,8 @@ class output(BaseParam): def parent(self): return self.api.Object.command - def _get_obj(self, cmd_output, **kwargs): - cmd, output = cmd_output + def _get_obj(self, obj, **kwargs): + cmd, output = obj required = True multivalue = False