diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 11:28:10 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 11:28:10 +0100 |
commit | c59b155fc0851612d055704bf5a304bed175a805 (patch) | |
tree | 14ba1d1e939590957d4f8eed1fee6a0cf2818655 /paste | |
parent | 75df77ea040040f671fa96d710a4d64e7aa82f72 (diff) | |
download | paste-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.py | 3 |
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 |