comparison twisted/plugins/libervia.py @ 437:fa3b65b68971

server side: ipdb is used instead of pdb in debug mode
author Goffi <goffi@goffi.org>
date Tue, 06 May 2014 23:08:08 +0200
parents bbdbee25123a
children 582c435dab6b
comparison
equal deleted inserted replaced
436:73f767a9ac2f 437:fa3b65b68971
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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
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
19 30
20 from zope.interface import implements 31 from zope.interface import implements
21 32
22 from twisted.python import usage 33 from twisted.python import usage
23 from twisted.plugin import IPlugin 34 from twisted.plugin import IPlugin