mirror of
https://github.com/python/cpython
synced 2024-10-14 10:18:12 +00:00
No longer need to use codehack -- use co.co_firstlineno instead.
This commit is contained in:
parent
2deb73a961
commit
c444865994
|
@ -112,7 +112,6 @@ def do_break(self, arg):
|
|||
filename = self.curframe.f_code.co_filename
|
||||
except:
|
||||
# Try function name as the argument
|
||||
import codehack
|
||||
try:
|
||||
func = arg
|
||||
if hasattr(func, 'im_func'):
|
||||
|
@ -122,7 +121,7 @@ def do_break(self, arg):
|
|||
print '*** The specified object',
|
||||
print 'is not a function', arg
|
||||
return
|
||||
lineno = codehack.getlineno(code)
|
||||
lineno = code.co_firstlineno
|
||||
filename = code.co_filename
|
||||
|
||||
# now set the break point
|
||||
|
|
Loading…
Reference in a new issue