Skip to content

Commit c710570

Browse files
committed
bam
1 parent 9a96a93 commit c710570

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎v3/pg_logger.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,14 @@ def open_wrapper(*args):
207207
Here is an example: http://goo.gl/Q9xQ4p''')
208208

209209

210+
# use a wrapper to prevent bdb from diving 'inside' of these functions
211+
# and causing massive confusion
210212
def eval_wrapper(*args):
211213
return eval(*args)
212214

215+
def exec_wrapper(*args):
216+
return exec(*args)
217+
213218

214219
class RawInputException(Exception):
215220
pass
@@ -1201,6 +1206,8 @@ def _runscript(self, script_str, custom_globals=None):
12011206
user_builtins[k] = open_wrapper
12021207
elif k == 'eval':
12031208
user_builtins[k] = eval_wrapper
1209+
elif k == 'exec':
1210+
user_builtins[k] = exec_wrapper
12041211
elif k in BANNED_BUILTINS:
12051212
continue
12061213
elif k == '__import__':

0 commit comments

Comments
 (0)