mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: fix unneeded-not
Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
@@ -156,10 +156,10 @@ class ACI:
|
||||
|
||||
returns True if valid
|
||||
"""
|
||||
if not type(self.permissions) in (tuple, list):
|
||||
if type(self.permissions) not in (tuple, list):
|
||||
raise SyntaxError("permissions must be a list")
|
||||
for p in self.permissions:
|
||||
if not p.lower() in PERMISSIONS:
|
||||
if p.lower() not in PERMISSIONS:
|
||||
raise SyntaxError("invalid permission: '%s'" % p)
|
||||
if not self.name:
|
||||
raise SyntaxError("name must be set")
|
||||
@@ -185,7 +185,7 @@ class ACI:
|
||||
if 'targetattr' in self.target:
|
||||
del self.target['targetattr']
|
||||
return
|
||||
if not type(attr) in (tuple, list):
|
||||
if type(attr) not in (tuple, list):
|
||||
attr = [attr]
|
||||
self.target['targetattr'] = {}
|
||||
self.target['targetattr']['expression'] = attr
|
||||
|
||||
Reference in New Issue
Block a user