diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-29 01:35:51 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-10-03 01:24:55 +0300 |
commit | edfb8c64f60bb56d0dc9124f2aebd21ed9d1188a (patch) | |
tree | 3d697b2a2742ba73fcd6a7f35044fb5519f1f9bd /source4/scripting | |
parent | e9620c5fd211c854ed3f05f8821079efa729bc33 (diff) | |
download | samba-edfb8c64f60bb56d0dc9124f2aebd21ed9d1188a.tar.gz samba-edfb8c64f60bb56d0dc9124f2aebd21ed9d1188a.tar.bz2 samba-edfb8c64f60bb56d0dc9124f2aebd21ed9d1188a.zip |
s4-samba.samdb: Fix leading indention and trailing ';'
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index bbc52a9ebd..f6b9b0e010 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -165,7 +165,7 @@ pwdLastSet: 0 if len(targetgroup) == 0: raise Exception('Unable to find group "%s"' % groupname) assert(len(targetgroup) == 1) - self.delete(targetgroup[0].dn); + self.delete(targetgroup[0].dn) except: self.transaction_cancel() raise @@ -204,22 +204,22 @@ changetype: modify expression="(|(sAMAccountName=%s)(CN=%s))" % (member, member), attrs=[]) if len(targetmember) != 1: - continue + continue if add_members_operation is True and (targetgroup[0].get('member') is None or str(targetmember[0].dn) not in targetgroup[0]['member']): - modified = True - addtargettogroup += """add: member + modified = True + addtargettogroup += """add: member member: %s """ % (str(targetmember[0].dn)) elif add_members_operation is False and (targetgroup[0].get('member') is not None and str(targetmember[0].dn) in targetgroup[0]['member']): - modified = True - addtargettogroup += """delete: member + modified = True + addtargettogroup += """delete: member member: %s """ % (str(targetmember[0].dn)) if modified is True: - self.modify_ldif(addtargettogroup) + self.modify_ldif(addtargettogroup) except: self.transaction_cancel() @@ -258,7 +258,7 @@ member: %s :param physicaldeliveryoffice: Office location of the new user """ - displayname = ""; + displayname = "" if givenname is not None: displayname += givenname @@ -277,8 +277,8 @@ member: %s # The new user record. Note the reliance on the SAMLDB module which # fills in the default informations ldbmessage = {"dn": user_dn, - "sAMAccountName": username, - "objectClass": "user"} + "sAMAccountName": username, + "objectClass": "user"} if surname is not None: ldbmessage["sn"] = surname |