From: Stephen Soltesz Date: Thu, 19 Jun 2008 19:12:02 +0000 (+0000) Subject: Stupidest bug in history. X-Git-Tag: NodeManager-1.7-16~2 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=b5b4493ac44d8a0400d2a1425833742689f84cad Stupidest bug in history. rstrip is a character oriented function, that nukes all characters in the argument, therefore, an attribute named "comon_exec.acl" will strip all the right most, 'a', 'c', 'l', and '.' characters. The result is 'comon_exe' b/c of the trailing 'c'. Ugg. --- diff --git a/vsys.py b/vsys.py index a429760..a2a6b9f 100644 --- a/vsys.py +++ b/vsys.py @@ -61,7 +61,7 @@ def touchAcls(): for (root, dirs, files) in os.walk(VSYSBKEND): for file in files: if file.endswith(".acl"): - acls.append(file.rstrip(".acl")) + acls.append(file.replace(".acl", "")) else: scripts.append(file) for new in (Set(scripts) - Set(acls)): @@ -101,7 +101,7 @@ def parseAcls(): for file in files: if file.endswith(".acl"): f = open(root+"/"+file,"r+") - scriptname = file.rstrip(".acl") + scriptname = file.replace(".acl", "") scriptacls[scriptname] = [] for slice in f.readlines(): scriptacls[scriptname].append(slice.rstrip())