summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Astori <jeremie@astori.fr>2015-08-20 22:40:15 +0000
committerJérémie Astori <jeremie@astori.fr>2015-08-20 22:58:49 +0000
commit0e659ad8723789310446221947256e33780e77d7 (patch)
tree11d326d12fb22f3d8b45744da79ec1050f31e7ec
parente95bcaeb8a98ec280acccadbb5491efc0c1679af (diff)
downloadansible-modules-core-0e659ad8723789310446221947256e33780e77d7.tar.gz
Make sure permission-less entries are accepted when state=absent
Also, remove that try condition as, at that stage, no permissions with other than 2 or 3 fields are sent to the function.
-rw-r--r--files/acl.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/files/acl.py b/files/acl.py
index 2bd27f62..58550c19 100644
--- a/files/acl.py
+++ b/files/acl.py
@@ -127,12 +127,10 @@ def split_entry(entry):
''' splits entry and ensures normalized return'''
a = entry.split(':')
- a.reverse()
- try:
- p, e, t = a
- except ValueError, e:
- print "wtf?? %s => %s" % (entry, a)
- raise e
+ if len(a) == 2:
+ a.append(None)
+
+ t, e, p = a
if t.startswith("u"):
t = "user"