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

Unified Diff: mojo/public/tools/bindings/run_code_generators.py

Issue 1418453017: Fix some minor bugs related to imports in the new mojom bindings generator. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tests. Created 5 years, 1 month 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 | « mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/run_code_generators.py
diff --git a/mojo/public/tools/bindings/run_code_generators.py b/mojo/public/tools/bindings/run_code_generators.py
index 6f278a350fcb560dbe3b2c2454ea47be8ee8560d..ebe2f1f69f3db2d551f1b8642ca308dc7e14b031 100755
--- a/mojo/public/tools/bindings/run_code_generators.py
+++ b/mojo/public/tools/bindings/run_code_generators.py
@@ -129,6 +129,8 @@ def FixModulePath(module, src_root_path):
abs_root: {str} absolute path to the root of the source tree.
"""
module.path = os.path.relpath(module.path, src_root_path)
+ if not hasattr(module, 'imports'):
+ return
for import_dict in module.imports:
FixModulePath(import_dict['module'], src_root_path)
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698