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.
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)):
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())