Issue #9323: Fixed a bug in trace.py that resulted in loosing the name
of the script being traced. Patch by Eli Bendersky.
This commit is contained in:
parent
8cb6dbf1b9
commit
3f8ecab589
|
@ -797,12 +797,9 @@ def main(argv=None):
|
|||
ignoredirs=ignore_dirs, infile=counts_file,
|
||||
outfile=counts_file, timing=timing)
|
||||
try:
|
||||
fp = open(progname)
|
||||
try:
|
||||
script = fp.read()
|
||||
finally:
|
||||
fp.close()
|
||||
t.run('exec(%r)' % (script,))
|
||||
with open(progname) as fp:
|
||||
code = compile(fp.read(), progname, 'exec')
|
||||
t.run(code)
|
||||
except IOError as err:
|
||||
_err_exit("Cannot run file %r because: %s" % (sys.argv[0], err))
|
||||
except SystemExit:
|
||||
|
|
|
@ -473,6 +473,9 @@ C-API
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #9323: Fixed a bug in trace.py that resulted in loosing the
|
||||
name of the script being traced. Patch by Eli Bendersky.
|
||||
|
||||
- Issue #9282: Fixed --listfuncs option of trace.py. Thanks Eli
|
||||
Bendersky for the patch.
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ timeit
|
|||
tkinter gpolo
|
||||
token georg.brandl
|
||||
tokenize
|
||||
trace
|
||||
trace alexander.belopolsky
|
||||
traceback georg.brandl
|
||||
tty
|
||||
turtle gregorlingl
|
||||
|
|
Loading…
Reference in New Issue