mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
python: sd_utils: remove redundant brackets around simple assert statements
Ideally these should be exceptions not asserts Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
1afb6465b8
commit
0127ddd7e2
@ -91,7 +91,7 @@ class SDUtils(object):
|
||||
|
||||
def ace_from_sddl(ace_sddl):
|
||||
ace_sd = security.descriptor.from_sddl("D:" + ace_sddl, self.domain_sid)
|
||||
assert (len(ace_sd.dacl.aces) == 1)
|
||||
assert len(ace_sd.dacl.aces) == 1
|
||||
return ace_sd.dacl.aces[0]
|
||||
|
||||
if sddl_attr is None:
|
||||
@ -131,7 +131,7 @@ class SDUtils(object):
|
||||
for ace in del_aces:
|
||||
if isinstance(ace, str):
|
||||
ace = ace_from_sddl(ace)
|
||||
assert (isinstance(ace, security.ace))
|
||||
assert isinstance(ace, security.ace)
|
||||
|
||||
if ace.flags & security.SEC_ACE_FLAG_INHERITED_ACE:
|
||||
inherited_ignored.append(ace)
|
||||
@ -152,7 +152,7 @@ class SDUtils(object):
|
||||
ace = ace["ace"]
|
||||
if isinstance(ace, str):
|
||||
ace = ace_from_sddl(ace)
|
||||
assert (isinstance(ace, security.ace))
|
||||
assert isinstance(ace, security.ace)
|
||||
|
||||
if ace.flags & security.SEC_ACE_FLAG_INHERITED_ACE:
|
||||
inherited_ignored.append(ace)
|
||||
|
Loading…
x
Reference in New Issue
Block a user