All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] useradd-staticids: use map() instead of imap()
@ 2016-07-12 19:10 George McCollister
  0 siblings, 0 replies; only message in thread
From: George McCollister @ 2016-07-12 19:10 UTC (permalink / raw)
  To: openembedded-core; +Cc: peter.kjellerstedt

In Python3 the itertools module's imap function has been migrated to the
globalname space as map(). Calling itertools.imap() will fail because it
no longer exists.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/classes/useradd-staticids.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index b6e498c..149245b 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -43,7 +43,7 @@ def update_useradd_static_config(d):
                         if fields[0] not in id_table:
                             id_table[fields[0]] = fields
                         else:
-                            id_table[fields[0]] = list(itertools.imap(lambda x, y: x or y, fields, id_table[fields[0]]))
+                            id_table[fields[0]] = list(map(lambda x, y: x or y, fields, id_table[fields[0]]))
             except IOError as e:
                 if e.errno == errno.ENOENT:
                     pass
-- 
2.8.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-12 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12 19:10 [PATCH] useradd-staticids: use map() instead of imap() George McCollister

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.