Commit 2cdeef7a authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

Fix `gn gen` with python3 and the Windows toolchain on a other drive.

In python3 map() return an iterable but doesn't actually do the map yet,
so the exception for the file being on another drive was produced in
code later and not caught. Force the expansion of the iterable using
list(map(...)).

Bug: 941669
Change-Id: I4f56f25a42cab102f4cd2f988907a60ec7e816af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517583Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823980}
parent 2bc908b1
...@@ -269,7 +269,7 @@ def main(): ...@@ -269,7 +269,7 @@ def main():
lib = [p.replace('"', r'\"') for p in env['LIB'].split(';') if p] lib = [p.replace('"', r'\"') for p in env['LIB'].split(';') if p]
# Make lib path relative to builddir when cwd and sdk in same drive. # Make lib path relative to builddir when cwd and sdk in same drive.
try: try:
lib = map(os.path.relpath, lib) lib = list(map(os.path.relpath, lib))
except ValueError: except ValueError:
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment