Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2465)

Unified Diff: build/android/gyp/util/build_utils.py

Issue 2567393003: [Chromecast] Fix for building Android Cast builds with virtualenv. (Closed)
Patch Set: Better describe the root cause of the issue Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/build_utils.py
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index 65bd07b351ca6aaaf65b5f4a8aa050145d99d8f9..53e51ba0c81700ad66008bb7da448a82ac0f8b8e 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -406,7 +406,10 @@ def GetPythonDependencies():
A path is assumed to be a "system" import if it is outside of chromium's
src/. The paths will be relative to the current directory.
"""
- module_paths = (m.__file__ for m in sys.modules.itervalues()
+ # Don't use sys.modules.itervalues() here. Inspecting the modules causes
+ # lazily imported modules (e.g. from email) to get fully imported and update
+ # sys.modules. This causes a runtime error when iterating with itervalues().
+ module_paths = (m.__file__ for m in sys.modules.values()
agrieve 2016/12/14 15:35:28 If it's being updated during iteration, then we're
if m is not None and hasattr(m, '__file__'))
abs_module_paths = map(os.path.abspath, module_paths)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698