diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-04-11 12:44:29 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-04-11 14:53:29 +0200 |
| commit | 3979f6802eeea275f949d28ddf4c18f84fc0f5aa (patch) | |
| tree | 0c67d60c80b2ece2e452837c187a79e9444334d8 /odoo/modules/module.py | |
| parent | ca74b5e1c8a48bcdeb396625ec0d8028a5a9d5f1 (diff) | |
[#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
Diffstat (limited to 'odoo/modules/module.py')
| -rw-r--r-- | odoo/modules/module.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py index ecf95be088b..be2977c131e 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -373,7 +373,7 @@ def load_openerp_module(module_name): if info['post_load']: getattr(sys.modules['odoo.addons.' + module_name], info['post_load'])() - except Exception, e: + except Exception as e: msg = "Couldn't load module %s" % (module_name) _logger.critical(msg) _logger.critical(e) @@ -427,7 +427,7 @@ def get_test_modules(module): modpath = 'odoo.addons.' + module try: mod = importlib.import_module('.tests', modpath) - except Exception, e: + except Exception as e: # If module has no `tests` sub-module, no problem. if str(e) != 'No module named tests': _logger.exception('Can not `import %s`.', module) |
