core: if in debug mode and ipdb is present, use ipdb instead of pdb

This commit is contained in:
Goffi 2014-05-05 20:16:14 +02:00
commit 675921a7d7

View file

@ -17,6 +17,17 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from twisted.internet import defer
if defer.Deferred.debug:
# if we are in debug mode, we want to use ipdb instead of pdb
try:
import ipdb
import pdb
pdb.set_trace = ipdb.set_trace
pdb.post_mortem = ipdb.post_mortem
except ImportError:
pass
from twisted.application import service
from twisted.internet import glib2reactor
glib2reactor.install()