Mercurial > libervia-backend
comparison src/sat.tac @ 1014:e40d9858cb83
core: if in debug mode and ipdb is present, use ipdb instead of pdb
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 05 May 2014 20:16:14 +0200 |
parents | 73a0b7f94674 |
children | a836b6da2c5c |
comparison
equal
deleted
inserted
replaced
1013:11409a6c16c7 | 1014:e40d9858cb83 |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from twisted.internet import defer | |
21 if defer.Deferred.debug: | |
22 # if we are in debug mode, we want to use ipdb instead of pdb | |
23 try: | |
24 import ipdb | |
25 import pdb | |
26 pdb.set_trace = ipdb.set_trace | |
27 pdb.post_mortem = ipdb.post_mortem | |
28 except ImportError: | |
29 pass | |
30 | |
20 from twisted.application import service | 31 from twisted.application import service |
21 from twisted.internet import glib2reactor | 32 from twisted.internet import glib2reactor |
22 glib2reactor.install() | 33 glib2reactor.install() |
23 | 34 |
24 # XXX: We need to configure logs before any log method is used, so here is the best place. | 35 # XXX: We need to configure logs before any log method is used, so here is the best place. |