diff -r ca698656251c -r a74e77469540 cubicweb/cwctl.py --- a/cubicweb/cwctl.py Wed Oct 16 14:49:38 2019 +0200 +++ b/cubicweb/cwctl.py Wed May 22 14:23:01 2019 +0200 @@ -40,7 +40,7 @@ from logilab.common.configuration import merge_options from logilab.common.decorators import clear_cache -from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage +from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage, utils from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CONFIGURATIONS from cubicweb.server import set_debug from cubicweb.toolsutils import Command, rm, create_dir, underline_title @@ -102,16 +102,6 @@ return [drop_prefix(cube) for cube in cwcfg.available_cubes()] -def get_pdb(): - try: - import ipdb - except ImportError: - import pdb - return pdb - else: - return ipdb - - class InstanceCommand(Command): """base class for command taking one instance id as arguments""" arguments = '' @@ -208,7 +198,7 @@ status = ex.code if status != 0 and self.config.pdb: - pdb = get_pdb() + pdb = utils.get_pdb() if traceback_ is not None: pdb.post_mortem(traceback_)