[inspector_protocol] Fix building with non-ASCII paths
The Python code internally treats path as unicode strings, but the
command line options are read as byte strings. Mixing these up
does not work properly, so decode the CLI arguments after parsing.
(This was noticed because it makes the Node.js build fail under
paths containing non-ASCII characters.)
Bug:
Change-Id: Ibbedda314aec98969db9859fc92b152f2c9239af
diff --git a/CodeGenerator.py b/CodeGenerator.py
index 1bc9535..6be153d 100644
--- a/CodeGenerator.py
+++ b/CodeGenerator.py
@@ -59,12 +59,15 @@
jinja_dir = arg_options.jinja_dir
if not jinja_dir:
raise Exception("jinja directory must be specified")
+ jinja_dir = jinja_dir.decode('utf8')
output_base = arg_options.output_base
if not output_base:
raise Exception("Base output directory must be specified")
+ output_base = output_base.decode('utf8')
config_file = arg_options.config
if not config_file:
raise Exception("Config file name must be specified")
+ config_file = config_file.decode('utf8')
config_base = os.path.dirname(config_file)
config_values = arg_options.config_value
if not config_values: