diff --git a/deps/v8/third_party/inspector_protocol/code_generator.py b/deps/v8/third_party/inspector_protocol/code_generator.py index 7c72cc70e4fbeb..cce68d316e4d5a 100755 --- a/deps/v8/third_party/inspector_protocol/code_generator.py +++ b/deps/v8/third_party/inspector_protocol/code_generator.py @@ -43,6 +43,9 @@ def json_object_hook(object_dict): items = [(k, os.path.join(output_base, v) if k == "output" else v) for (k, v) in items] keys, values = list(zip(*items)) + # 'async' is a Python 3.7+ keyword. Don't use namedtuple(rename=True) + # because that would only rename async on Python 3 but not on Python 2. + keys = ['async_' if k == 'async' else k for k in keys] return collections.namedtuple('X', keys)(*values) return json.loads(data, object_hook=json_object_hook) @@ -128,7 +131,7 @@ def init_defaults(config_tuple, path, defaults): except Exception: # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html exc = sys.exc_info()[1] - sys.stderr.write("Failed to parse config file: %s\n\n" % exc) + sys.stderr.write("Deps: Failed to parse config file: %s\n\n" % exc) exit(1) @@ -555,7 +558,7 @@ def is_async_command(self, domain, command): if not self.config.protocol.options: return False return self.check_options(self.config.protocol.options, domain, command, - "async", None, False) + "async_", None, False) def is_exported(self, domain, name): if not self.config.protocol.options: diff --git a/tools/inspector_protocol/code_generator.py b/tools/inspector_protocol/code_generator.py index 7b555d7478a0c7..0f37649e379f01 100755 --- a/tools/inspector_protocol/code_generator.py +++ b/tools/inspector_protocol/code_generator.py @@ -109,7 +109,7 @@ def init_defaults(config_tuple, path, defaults): except Exception: # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html exc = sys.exc_info()[1] - sys.stderr.write("Failed to parse config file: %s\n\n" % exc) + sys.stderr.write("Tools: Failed to parse config file: %s\n\n" % exc) exit(1)