Fix mojom_ts_generator.py error with Python 3.11
This commit is contained in:
parent
50eaaaacd6
commit
4bc6a5995a
|
@ -704,5 +704,10 @@ patches = [
|
|||
# chrome: mac: Support locale configuration.
|
||||
# https://github.com/chromiumembedded/cef/issues/3623
|
||||
'name': 'mac_chrome_locale_3623'
|
||||
},
|
||||
{
|
||||
# Fix mojom_ts_generator.py error with Python 3.11.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1422178
|
||||
'name': 'mojo_generator_1422178'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git mojo/public/tools/bindings/generators/mojom_ts_generator.py mojo/public/tools/bindings/generators/mojom_ts_generator.py
|
||||
index 98516f03276e4..a1bda9c021c52 100644
|
||||
--- mojo/public/tools/bindings/generators/mojom_ts_generator.py
|
||||
+++ mojo/public/tools/bindings/generators/mojom_ts_generator.py
|
||||
@@ -177,6 +177,8 @@ def _GetWebUiModulePath(module):
|
||||
path = module.metadata.get('webui_module_path')
|
||||
if path is None or path == '/':
|
||||
return path
|
||||
+ if path == '':
|
||||
+ return '/'
|
||||
if _IsAbsoluteChromeResourcesPath(path):
|
||||
return path.rstrip('/') + '/'
|
||||
return '/{}/'.format(path.strip('/'))
|
Loading…
Reference in New Issue