[migration/shell] select ipdb if present on (d)ebug mode
authorLaurent Peuch <cortex@worlddomination.be>
Wed, 22 May 2019 17:08:09 +0200
changeset 12744 19aef4729d45
parent 12743 a74e77469540
child 12745 cc681b6fcffa
[migration/shell] select ipdb if present on (d)ebug mode Closes #17219833
cubicweb/migration.py
--- a/cubicweb/migration.py	Wed May 22 14:23:01 2019 +0200
+++ b/cubicweb/migration.py	Wed May 22 17:08:09 2019 +0200
@@ -32,7 +32,7 @@
 from logilab.common.shellutils import ASK
 from logilab.common.changelog import Version
 
-from cubicweb import ConfigurationError, ExecutionError
+from cubicweb import ConfigurationError, ExecutionError, utils
 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg
 from cubicweb.toolsutils import show_diffs
 
@@ -228,7 +228,7 @@
             self.interactive_shell()
             return self.confirm(question, shell, abort, retry, pdb, default)
         if answer == 'pdb':
-            import pdb
+            pdb = utils.get_pdb()
             pdb.set_trace()
             return self.confirm(question, shell, abort, retry, pdb, default)
         return True