diff --git a/odoo/tools/__init__.py b/odoo/tools/__init__.py index 4bc5254382d..f08fc9bf412 100644 --- a/odoo/tools/__init__.py +++ b/odoo/tools/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. - +SUPPORTED_DEBUGGER = {'pdb', 'ipdb', 'wdb', 'pudb'} from . import _monkeypatches from . import appdirs from . import cloc @@ -10,7 +10,6 @@ from . import win32 from .barcode import * from .config import config from .date_utils import * -from .debugger import * from .float_utils import * from .func import * from .image import * diff --git a/odoo/tools/config.py b/odoo/tools/config.py index 37731d7c4ec..b4aadec0d66 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -293,7 +293,7 @@ class configmanager(object): group = optparse.OptionGroup(parser, "Advanced options") group.add_option('--dev', dest='dev_mode', type="string", help="Enable developer mode. Param: List of options separated by comma. " - "Options : all, [pudb|wdb|ipdb|pdb], reload, qweb, werkzeug, xml") + "Options : all, reload, qweb, werkzeug, xml") group.add_option('--shell-interface', dest='shell_interface', type="string", help="Specify a preferred REPL to use in shell mode. Supported REPLs are: " "[ipython|ptpython|bpython|python]") @@ -529,7 +529,7 @@ class configmanager(object): self.options['translate_modules'].sort() dev_split = opt.dev_mode and [s.strip() for s in opt.dev_mode.split(',')] or [] - self.options['dev_mode'] = 'all' in dev_split and dev_split + ['pdb', 'reload', 'qweb', 'werkzeug', 'xml'] or dev_split + self.options['dev_mode'] = 'all' in dev_split and dev_split + ['reload', 'qweb', 'werkzeug', 'xml'] or dev_split if opt.pg_path: self.options['pg_path'] = opt.pg_path diff --git a/odoo/tools/debugger.py b/odoo/tools/debugger.py deleted file mode 100644 index 55ac46e8ddb..00000000000 --- a/odoo/tools/debugger.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. -import importlib -import logging -import types - -_logger = logging.getLogger(__name__) -SUPPORTED_DEBUGGER = {'pdb', 'ipdb', 'wdb', 'pudb'} - - -def post_mortem(config, info): - if config['dev_mode'] and isinstance(info[2], types.TracebackType): - debug = next((opt for opt in config['dev_mode'] if opt in SUPPORTED_DEBUGGER), None) - if debug: - try: - # Try to import the xpdb from config (pdb, ipdb, pudb, ...) - importlib.import_module(debug).post_mortem(info[2]) - except ImportError: - _logger.error('Error while importing %s.' % debug)