mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix assorted bugs found by pylint
This commit is contained in:
@@ -369,7 +369,7 @@ class dnsrecord(LDAPObject):
|
||||
),
|
||||
)
|
||||
|
||||
def is_pkey_zone_record(*keys):
|
||||
def is_pkey_zone_record(self, *keys):
|
||||
idnsname = keys[-1]
|
||||
if idnsname == '@' or idnsname == ('%s.' % keys[-2]):
|
||||
return True
|
||||
|
||||
@@ -160,7 +160,7 @@ class group_del(LDAPDelete):
|
||||
def_primary_group = config.get('ipadefaultprimarygroup', '')
|
||||
def_primary_group_dn = group_dn = self.obj.get_dn(def_primary_group)
|
||||
if dn == def_primary_group_dn:
|
||||
raise errors.DefaultGroup()
|
||||
raise errors.DefaultGroupError()
|
||||
group_attrs = self.obj.methods.show(
|
||||
self.obj.get_primary_key_from_dn(dn), all=True
|
||||
)['result']
|
||||
|
||||
@@ -437,7 +437,6 @@ class host_del(LDAPDelete):
|
||||
break
|
||||
if not match:
|
||||
raise errors.NotFound(reason=_('DNS zone %(zone)s not found' % dict(zone=domain)))
|
||||
raise e
|
||||
# Get all forward resources for this host
|
||||
records = api.Command['dnsrecord_find'](domain, idnsname=parts[0])['result']
|
||||
for record in records:
|
||||
|
||||
Reference in New Issue
Block a user