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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 23534063: Make SchemaLoader independent of current working directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use two separate paths Created 7 years, 3 months 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
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index ddab77eadd76a278dccd3778ec32009ee79dea32..b6045ffb61007ec584080c38a2613abcd6f0654e 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -38,15 +38,16 @@ def GenerateSchema(generator,
destdir,
root_namespace,
dart_overrides_dir):
- schema_loader = SchemaLoader(os.path.dirname(os.path.relpath(
- os.path.normpath(filenames[0]), root)))
+ schema_loader = SchemaLoader(
+ os.path.dirname(os.path.relpath(os.path.normpath(filenames[0]), root)),
+ os.path.dirname(filenames[0]))
# Merge the source files into a single list of schemas.
api_defs = []
for filename in filenames:
schema = os.path.normpath(filename)
schema_filename, schema_extension = os.path.splitext(schema)
path, short_filename = os.path.split(schema_filename)
- api_def = schema_loader.LoadSchema(schema)
+ api_def = schema_loader.LoadSchema(short_filename + schema_extension)
not at google - send to devlin 2013/09/27 16:10:20 if you use os.path.split(schema)[1] rather than (s
msimonides 2013/09/30 07:18:48 Done.
# If compiling the C++ model code, delete 'nocompile' nodes.
if generator == 'cpp':
« no previous file with comments | « no previous file | tools/json_schema_compiler/schema_loader.py » ('j') | tools/json_schema_compiler/schema_loader.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698