summaryrefslogtreecommitdiff
path: root/paste/evalexception
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 11:28:10 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 11:28:10 +0100
commit9581b71fc493ddc75d4b461661df084e3006afc6 (patch)
tree14ba1d1e939590957d4f8eed1fee6a0cf2818655 /paste/evalexception
parent6916751bf7d7107f5dce709c02ae8e60c46e1176 (diff)
downloadpaste-9581b71fc493ddc75d4b461661df084e3006afc6.tar.gz
Python 3: Replace exec statement with six.exec_() to support Python 2 and Python 3
Diffstat (limited to 'paste/evalexception')
-rw-r--r--paste/evalexception/evalcontext.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/evalexception/evalcontext.py b/paste/evalexception/evalcontext.py
index dbd49fb..42f2efa 100644
--- a/paste/evalexception/evalcontext.py
+++ b/paste/evalexception/evalcontext.py
@@ -4,6 +4,7 @@ from six.moves import cStringIO as StringIO
import traceback
import threading
import pdb
+import six
import sys
exec_lock = threading.Lock()
@@ -34,7 +35,7 @@ class EvalContext(object):
sys.stdout = out
try:
code = compile(s, '<web>', "single", 0, 1)
- exec code in self.namespace, self.globs
+ six.exec_(code, self.globs, self.namespace)
debugger.set_continue()
except KeyboardInterrupt:
raise