Mercurial > libervia-backend
changeset 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 | 11409a6c16c7 |
children | fee00f2e11c2 |
files | src/sat.tac |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sat.tac Mon May 05 20:16:13 2014 +0200 +++ b/src/sat.tac Mon May 05 20:16:14 2014 +0200 @@ -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()