[filter] Fonction pour récupérer une structure de donnée manipulable en python
This commit is contained in:
parent
cb4ac3ca18
commit
aa573c3c35
2 changed files with 11 additions and 6 deletions
|
@ -43,6 +43,10 @@ def toldapfilter(l):
|
|||
return "!(%s=%s)" % (l[1], l[2])
|
||||
return op + ''.join(['(%s)' % toldapfilter(i) for i in l[1:]])
|
||||
|
||||
def human_to_ldap(str):
|
||||
return "(%s)" % toldapfilter(toprefix(simplify(expr.parseString(str).asList())))
|
||||
def human_to_list(data):
|
||||
if data:
|
||||
return toprefix(simplify(expr.parseString(data).asList()))
|
||||
|
||||
def human_to_ldap(data):
|
||||
return "(%s)" % toldapfilter(human_to_list(data))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue