summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-12 12:25:30 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commitace63f4ea55643cb99aaa444d216a6bb9ebb1ed3 (patch)
tree0b5367a1b43369dc0ea20b9e8fde91d44abed1f1 /ipaserver
parentfbacc26a6a8b92f4b3570c411b186ab86cbcc1b1 (diff)
downloadfreeipa-ace63f4ea55643cb99aaa444d216a6bb9ebb1ed3.tar.gz
freeipa-ace63f4ea55643cb99aaa444d216a6bb9ebb1ed3.tar.xz
freeipa-ace63f4ea55643cb99aaa444d216a6bb9ebb1ed3.zip
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>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/ipa_otptoken_import.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/install/ipa_otptoken_import.py b/ipaserver/install/ipa_otptoken_import.py
index 5f5d21560..4d901d08e 100644
--- a/ipaserver/install/ipa_otptoken_import.py
+++ b/ipaserver/install/ipa_otptoken_import.py
@@ -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):