Split = re.split("[:\n]",Line);
(Split[4],cn,mn,sn) = ParseGecos(Split[4]);
- Split[2] = int(Split[2])
- Split[3] = int(Split[3])
+ # This just tests whether these are integers and throws an
+ # exception if not
+ int(Split[2])
+ int(Split[3])
Rec = [("uid",Split[0]),
("uidNumber",Split[2]),
("gidNumber",Split[3]),
if (DoAdd == 1):
try:
- AddRec = Rec
- Rec.append(("objectClass", UserObjectClasses))
+ AddRec = Rec[:]
+ AddRec.append(("objectClass", UserObjectClasses))
l.add_s(Dn,AddRec)
DoModify = False
continue;
for x in range(2,8):
- Split[x] = int(Split[x])
+ int(Split[x])
Rec = [(ldap.MOD_REPLACE,"shadowLastChange",Split[2]),
(ldap.MOD_REPLACE,"shadowMin",Split[3]),
# Split up the group information
Split = re.split("[:\n]",Line);
Members = re.split("[, ]*",Split[3]);
- Split[2] = int(Split[2])
+ int(Split[2])
# Iterate over the membership list and add the membership information
# To the directory