mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Merged revisions 83035 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83035 | alexander.belopolsky | 2010-07-21 13:43:42 -0400 (Wed, 21 Jul 2010) | 3 lines 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
913c52edf3
commit
eeec92fd8a
3 changed files with 7 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue