diff options
Diffstat (limited to 'python/samba/schema.py')
-rw-r--r-- | python/samba/schema.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/python/samba/schema.py b/python/samba/schema.py index 4e6381306ca..839d681825a 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -156,12 +156,19 @@ dn: @INDEXLIST # Return a hash with the forward attribute as a key and the back as the value -def get_linked_attributes(schemadn,schemaldb): +def get_linked_attributes(schemadn, schemaldb): attrs = ["linkID", "lDAPDisplayName"] - res = schemaldb.search(expression="(&(linkID=*)(!(linkID:1.2.840.113556.1.4.803:=1))(objectclass=attributeSchema)(attributeSyntax=2.5.5.1))", base=schemadn, scope=SCOPE_ONELEVEL, attrs=attrs) + res = schemaldb.search( + expression="(&(linkID=*)" + "(!(linkID:1.2.840.113556.1.4.803:=1))" + "(objectclass=attributeSchema)" + "(attributeSyntax=2.5.5.1))", + base=schemadn, scope=SCOPE_ONELEVEL, attrs=attrs) attributes = {} for i in range(0, len(res)): - expression = "(&(objectclass=attributeSchema)(linkID=%d)(attributeSyntax=2.5.5.1))" % (int(res[i]["linkID"][0])+1) + expression = ("(&(objectclass=attributeSchema)(linkID=%d)" + "(attributeSyntax=2.5.5.1))" % + (int(res[i]["linkID"][0])+1)) target = schemaldb.searchone(basedn=schemadn, expression=expression, attribute="lDAPDisplayName", |