Skip to content

Commit

Permalink
Catch and ignore error setting IPython's user_global_ns. (reported by…
Browse files Browse the repository at this point in the history
… Aaron Meurer)
  • Loading branch information
inducer committed Jan 6, 2012
1 parent 8d0a9a4 commit 14c076b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pudb/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,16 @@ def run_ipython_shell_v11(locals, globals, first_time):

def _update_ns(shell, locals, globals):
'''Update the IPython 0.11 namespace at every visit'''

shell.user_ns = locals.copy()
shell.user_global_ns = globals

try:
shell.user_global_ns = globals
except AttributeError:
pass

shell.init_user_ns()
shell.init_completer()
return

# Set the proper ipython shell
if HAVE_IPYTHON and hasattr(IPython, 'Shell'):
Expand Down

0 comments on commit 14c076b

Please sign in to comment.