summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/pdb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 7a00b83..f44c7e0 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -74,8 +74,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
locals = self.curframe.f_locals
globals = self.curframe.f_globals
globals['__privileged__'] = 1
+ code = compile(line + '\n', '<stdin>', 'single')
try:
- exec(line + '\n', globals, locals)
+ exec code in globals, locals
except:
if type(sys.exc_type) == type(''):
exc_type_name = sys.exc_type