core: if in debug mode and ipdb is present, use ipdb instead of pdb
This commit is contained in:
parent
2802250596
commit
675921a7d7
1 changed files with 11 additions and 0 deletions
11
src/sat.tac
11
src/sat.tac
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue