build_utils.py: itervalues() Python 3 fix
itervalues() has been removed in Python 3 in favour of values(). They're functionally equivalent, but values() is slightly slower in Python 2. In this case there shouldn't be a difference because sys.modules is usually pretty small. Example backtrace: Traceback (most recent call last): File "../../tools/licenses.py", line 809, in <module> sys.exit(main()) File "../../tools/licenses.py", line 791, in main if not GenerateCredits(args.file_template, args.entry_template, File "../../tools/licenses.py", line 717, in GenerateCredits build_utils.WriteDepfile(depfile, output_file, File "C:\Google\chromium\src\build/android/gyp\util\build_utils.py", line 563, in WriteDepfile inputs = _ComputePythonDependencies() + inputs File "C:\Google\chromium\src\build/android/gyp\util\build_utils.py", line 514, in _ComputePythonDependencies module_paths = (m.__file__ for m in sys.modules.itervalues() AttributeError: 'dict' object has no attribute 'itervalues' Bug: 941669 Change-Id: I3a5e1602f3dda99ea97f328811d941de73cb76eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857124 Auto-Submit: Raul Tambre <raul@tambre.ee> Commit-Queue: Andrew Grieve <agrieve@chromium.org> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#706004}
Showing
Please register or sign in to comment