Commit 7dd803a4 authored by Georg Brandl's avatar Georg Brandl

Repair a bad translation of the exec statement.

Fixes #1038: pdb command line invocation fails.
parent a00f1237
...@@ -1166,12 +1166,8 @@ see no sign that the breakpoint was reached. ...@@ -1166,12 +1166,8 @@ see no sign that the breakpoint was reached.
self._wait_for_mainpyfile = 1 self._wait_for_mainpyfile = 1
self.mainpyfile = self.canonic(filename) self.mainpyfile = self.canonic(filename)
self._user_requested_quit = 0 self._user_requested_quit = 0
fp = open(filename) with open(filename) as fp:
try: statement = fp.read()
script = fp.read()
finally:
fp.close()
statement = 'exec("%s")' % script
self.run(statement) self.run(statement)
# Simplified interface # Simplified interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment