mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
Replace uses of map()
In Python 2, map() returns a list; in Python 3 it returns an iterator. Replace all uses by list comprehensions, generators, or for loops, as required. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
1 parent
fbacc26a6a
commit
ace63f4ea5
18 files changed
+37
-35
No files matched your search
@@ -42,12 +42,12 @@ class ValidationError(Exception):
|
||||
|
||||
|
||||
def fetchAll(element, xpath, conv=lambda x: x):
|
||||
return map(conv, element.xpath(xpath, namespaces={
|
||||
return [conv(e) for e in element.xpath(xpath, namespaces={
|
||||
"pskc": "urn:ietf:params:xml:ns:keyprov:pskc",
|
||||
"xenc11": "http://www.w3.org/2009/xmlenc11#",
|
||||
"xenc": "http://www.w3.org/2001/04/xmlenc#",
|
||||
"ds": "http://www.w3.org/2000/09/xmldsig#",
|
||||
}))
|
||||
})]
|
||||
|
||||
|
||||
def fetch(element, xpath, conv=lambda x: x, default=None):
|
||||
|
||||
Reference in new issue
Block a user