From b30cdb5330940c4606acbb83b057335be480552b Mon Sep 17 00:00:00 2001 From: Richard Connon Date: Tue, 4 Feb 2014 16:20:24 +0000 Subject: Removed redundant condition for empty default ACL --- src/lib/Bcfg2/Client/Tools/POSIX/base.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-1-g7c22