diff options
author | Richard Connon <richard@connon.me.uk> | 2014-02-04 16:20:24 +0000 |
---|---|---|
committer | Richard Connon <richard@connon.me.uk> | 2014-02-04 16:20:24 +0000 |
commit | b30cdb5330940c4606acbb83b057335be480552b (patch) | |
tree | d29e7cd7e948600fe44a19b5ce8f2cafb3b62bb2 /src | |
parent | 310ec389a7542b8f7aeb807c6ed71ae7a82515d0 (diff) | |
download | bcfg2-b30cdb5330940c4606acbb83b057335be480552b.tar.gz bcfg2-b30cdb5330940c4606acbb83b057335be480552b.tar.bz2 bcfg2-b30cdb5330940c4606acbb83b057335be480552b.zip |
Removed redundant condition for empty default ACL
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/POSIX/base.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/base.py b/src/lib/Bcfg2/Client/Tools/POSIX/base.py index 4089e9f22..d230a5b3a 100644 --- a/src/lib/Bcfg2/Client/Tools/POSIX/base.py +++ b/src/lib/Bcfg2/Client/Tools/POSIX/base.py @@ -219,14 +219,13 @@ class POSIXTool(Bcfg2.Client.Tools.Tool): acl.delete_entry(aclentry) if os.path.isdir(path): defacl = posix1e.ACL(filedef=path) - if defacl.valid(): - for aclentry in defacl: - if aclentry.tag_type in [posix1e.ACL_USER, - posix1e.ACL_USER_OBJ, - posix1e.ACL_GROUP, - posix1e.ACL_GROUP_OBJ, - posix1e.ACL_OTHER]: - defacl.delete_entry(aclentry) + for aclentry in defacl: + if aclentry.tag_type in [posix1e.ACL_USER, + posix1e.ACL_USER_OBJ, + posix1e.ACL_GROUP, + posix1e.ACL_GROUP_OBJ, + posix1e.ACL_OTHER]: + defacl.delete_entry(aclentry) else: defacl = None |