summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Connon <richard@connon.me.uk>2014-02-04 16:20:24 +0000
committerRichard Connon <richard@connon.me.uk>2014-02-04 16:20:24 +0000
commitb30cdb5330940c4606acbb83b057335be480552b (patch)
treed29e7cd7e948600fe44a19b5ce8f2cafb3b62bb2
parent310ec389a7542b8f7aeb807c6ed71ae7a82515d0 (diff)
downloadbcfg2-b30cdb5330940c4606acbb83b057335be480552b.tar.gz
bcfg2-b30cdb5330940c4606acbb83b057335be480552b.tar.bz2
bcfg2-b30cdb5330940c4606acbb83b057335be480552b.zip
Removed redundant condition for empty default ACL
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/base.py15
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