mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
#6323: pdb doesn't deal well with SyntaxErrors.
It seems necessary to keep two layers of 'exec' (one in Bdb.run, one in Pdb._runscript);
this allows the tracing function to be active when the inner 'exec' runs
and tries to compile the real code.
This partially revert r58127, the net effet of the two changes is to replace
"exec('%s')" with "exec(%r)".
This commit is contained in:
parent
ace3102131
commit
a63505437a
1 changed files with 1 additions and 1 deletions
|
|
@ -1211,7 +1211,7 @@ see no sign that the breakpoint was reached.
|
||||||
self.mainpyfile = self.canonic(filename)
|
self.mainpyfile = self.canonic(filename)
|
||||||
self._user_requested_quit = 0
|
self._user_requested_quit = 0
|
||||||
with open(filename) as fp:
|
with open(filename) as fp:
|
||||||
statement = fp.read()
|
statement = "exec(%r)" % (fp.read(),)
|
||||||
self.run(statement)
|
self.run(statement)
|
||||||
|
|
||||||
# Simplified interface
|
# Simplified interface
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue