summaryrefslogtreecommitdiff
path: root/paste
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
commitc59b155fc0851612d055704bf5a304bed175a805 (patch)
tree14ba1d1e939590957d4f8eed1fee6a0cf2818655 /paste
parent75df77ea040040f671fa96d710a4d64e7aa82f72 (diff)
downloadpaste-git-c59b155fc0851612d055704bf5a304bed175a805.tar.gz
Python 3: Replace exec statement with six.exec_() to support Python 2 and Python 3
Diffstat (limited to 'paste')
-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