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.
self._wait_for_mainpyfile = 1
self.mainpyfile = self.canonic(filename)
self._user_requested_quit = 0
fp = open(filename)
try:
script = fp.read()
finally:
fp.close()
statement = 'exec("%s")' % script
with open(filename) as fp:
statement = fp.read()
self.run(statement)
# 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