mirror of
https://github.com/samba-team/samba.git
synced 2025-07-27 07:42:04 +03:00
s4-python: Various formatting fixes.
* Trailing whitespace * use of "==" where "is" should be used * double spaces
This commit is contained in:
@ -155,16 +155,16 @@ dn: @INDEXLIST
|
||||
return dsdb._dsdb_convert_schema_to_openldap(self.ldb, target, mapping)
|
||||
|
||||
|
||||
# Return a hash with the forward attribute as a key and the back as the value
|
||||
# Return a hash with the forward attribute as a key and the back as the value
|
||||
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)
|
||||
attributes = {}
|
||||
for i in range (0, len(res)):
|
||||
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",
|
||||
target = schemaldb.searchone(basedn=schemadn,
|
||||
expression=expression,
|
||||
attribute="lDAPDisplayName",
|
||||
scope=SCOPE_SUBTREE)
|
||||
if target is not None:
|
||||
attributes[str(res[i]["lDAPDisplayName"])]=str(target)
|
||||
|
Reference in New Issue
Block a user