mirror of https://github.com/ARMmbed/mbed-os.git
Fix Makefile export with Python 3
In Python 3, the map() function returns a map object, not a list object as in Python 2. Ensure a list object is returned from format_flags() by wrapping map() in list(). This is compatible with both Python 2 and 3.pull/8577/head
parent
503066a736
commit
b31156a906
|
@ -165,7 +165,7 @@ class Makefile(Exporter):
|
|||
flags = {}
|
||||
for k, v in self.flags.items():
|
||||
if k in ['c_flags', 'cxx_flags']:
|
||||
flags[k] = map(lambda x: x.replace('"', '\\"'), v)
|
||||
flags[k] = list(map(lambda x: x.replace('"', '\\"'), v))
|
||||
else:
|
||||
flags[k] = v
|
||||
|
||||
|
|
Loading…
Reference in New Issue