diff options
| author | Xavier Morel <xmo@odoo.com> | 2021-05-20 08:33:49 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2021-05-20 16:36:04 +0000 |
| commit | 6e084cefb62fdc94b94d0ef573dce28bfe8961e1 (patch) | |
| tree | 5b78d967dda7bfe7b444d54b961a92e196613bb1 /odoo/addons/base | |
| parent | 387c7abd2b4e82ba6078b867cc36b2b865302f7b (diff) | |
[FIX] base: confusion between werkzeug.urls and urls local
As part of the Python 3 compatibility effort,
01e35141479b8dfc4a390518f89fc52e7cec5396 moved all uses of urllib(2)
to werkzeug & requests as the packages were renamed and reorganised
between P2 and P3.
For `module.py`, it looks like I confused the `urls` local variable
for an already imported `werkzeug.urls` and just tried calling
`url_parse` on that. Which doesn't work, because `urls` is a
dict.
Fixes #71076
closes odoo/odoo#71117
X-original-commit: 0cfe528de82c1de8971e5bb5f66103447eae781c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Diffstat (limited to 'odoo/addons/base')
| -rw-r--r-- | odoo/addons/base/models/ir_module.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/addons/base/models/ir_module.py b/odoo/addons/base/models/ir_module.py index d53c7a2484b..4ffa3449529 100644 --- a/odoo/addons/base/models/ir_module.py +++ b/odoo/addons/base/models/ir_module.py @@ -15,6 +15,7 @@ import threading import zipfile import requests +import werkzeug.urls from docutils import nodes from docutils.core import publish_string @@ -784,7 +785,7 @@ class Module(models.Model): _logger.warning(msg) raise UserError(msg) - apps_server = urls.url_parse(self.get_apps_server()) + apps_server = werkzeug.urls.url_parse(self.get_apps_server()) OPENERP = odoo.release.product_name.lower() tmp = tempfile.mkdtemp() @@ -795,7 +796,7 @@ class Module(models.Model): if not url: continue # nothing to download, local version is already the last one - up = urls.url_parse(url) + up = werkzeug.urls.url_parse(url) if up.scheme != apps_server.scheme or up.netloc != apps_server.netloc: raise AccessDenied() |
