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 | 9581b71fc493ddc75d4b461661df084e3006afc6 (patch) | |
tree | 14ba1d1e939590957d4f8eed1fee6a0cf2818655 /paste | |
parent | 6916751bf7d7107f5dce709c02ae8e60c46e1176 (diff) | |
download | paste-9581b71fc493ddc75d4b461661df084e3006afc6.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 |