From edfb8c64f60bb56d0dc9124f2aebd21ed9d1188a Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Wed, 29 Sep 2010 01:35:51 +0300 Subject: s4-samba.samdb: Fix leading indention and trailing ';' --- source4/scripting/python/samba/samdb.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4') 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 -- cgit