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: Iebbfaca67cda72300636e51686bac3b1513b127d
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>