diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-17 13:56:46 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-07-18 11:49:28 +0200 |
| commit | 3cad551a88d206950e31be1ae6d64a35febfadd4 (patch) | |
| tree | f5df08b970bd32f8aee150d498a68a7b1dbc4679 /addons/web/static/src/js/views/basic | |
| parent | 9bd793e1b5f62a45261667665e71749cab722583 (diff) | |
[FIX] P3: stupid use of hasattr
In Python 2, hasattr swallows *any* exception raised during the
access. In Python 3, it only swallows AttributeError.
Accessing an attribute on an unbound threadlocal proxy raises
RuntimeError, while running test_ir_http_mimetype ``request`` is
unbound, in Python 2 ``hasattr`` would return ``False`` on an unbound
threadlocal, in Python 3 it lets ``RuntimeError`` pass through blowing
up the test.
Fix this by just checking if the threadlocal is bound by using it as a
boolean…
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions
