From f39cf0bef35dc132349501bbbf38b977443485f8 2011-11-24 18:51:37 From: Fernando Perez Date: 2011-11-24 18:51:37 Subject: [PATCH] Address shell object in magic explicitly. --- diff --git a/IPython/core/magic.py b/IPython/core/magic.py index 56b6baf..a64acad 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -2688,7 +2688,7 @@ Defaulting color scheme to 'NoColor'""" from IPython.core.alias import InvalidAliasError # for the benefit of module completer in ipy_completers.py - del self.db['rootmodules'] + del self.shell.db['rootmodules'] path = [os.path.abspath(os.path.expanduser(p)) for p in os.environ.get('PATH','').split(os.pathsep)] @@ -2745,8 +2745,7 @@ Defaulting color scheme to 'NoColor'""" except InvalidAliasError: pass syscmdlist.append(ff) - db = self.db - db['syscmdlist'] = syscmdlist + self.shell.db['syscmdlist'] = syscmdlist finally: os.chdir(savedir)