mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Simplify how post_mortem is launched
This commit is contained in:
14
sith.py
14
sith.py
@@ -247,16 +247,10 @@ class AttackApp(object):
|
|||||||
try:
|
try:
|
||||||
func(**kwds)
|
func(**kwds)
|
||||||
except:
|
except:
|
||||||
exc_info = sys.exc_info()
|
if debugger:
|
||||||
if debugger == 'pdb':
|
einfo = sys.exc_info()
|
||||||
import pdb
|
pdb = __import__(debugger)
|
||||||
pdb.post_mortem(exc_info[2])
|
pdb.post_mortem(einfo if debugger == 'pudb' else einfo[2])
|
||||||
elif debugger == 'ipdb':
|
|
||||||
import ipdb
|
|
||||||
ipdb.post_mortem(exc_info[2])
|
|
||||||
elif debugger == 'pudb':
|
|
||||||
import pudb
|
|
||||||
pudb.post_mortem(exc_info)
|
|
||||||
|
|
||||||
def add_parser(self, attacker_class, *args, **kwds):
|
def add_parser(self, attacker_class, *args, **kwds):
|
||||||
attacker = attacker_class()
|
attacker = attacker_class()
|
||||||
|
|||||||
Reference in New Issue
Block a user