Previously we use map() to apply changes to every item in a iterable
object, but this is not a proper usage. And in Python3, map() will
return a map iterator object, changes will not be applied immediately,
as we're not iterating the map object, changes will never be applied.
Changing to for loop instead fixes.
Reviewed: https:/ /review. openstack. org/554682 /git.openstack. org/cgit/ openstack/ trove-dashboard /commit/ ?id=5001b8eaf2d ae87cf5ec299964 344d1d58b18908
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 5001b8eaf2dae87 cf5ec299964344d 1d58b18908
Author: Zhao Chao <email address hidden>
Date: Thu Mar 15 21:39:10 2018 +0800
Use for loop instead of map to modify iterables
Previously we use map() to apply changes to every item in a iterable
object, but this is not a proper usage. And in Python3, map() will
return a map iterator object, changes will not be applied immediately,
as we're not iterating the map object, changes will never be applied.
Changing to for loop instead fixes.
Partial-Bug: #1755413
Change-Id: Iebbfaca67cda72 300636e51686bac 3b1513b127d 1fab1f733b2860b 242b393035)
Signed-off-by: Zhao Chao <email address hidden>
(cherry picked from commit e5f00207f7ca4ab