##// END OF EJS Templates
Fix crash with a naked 'alias' call in ipythonrc file.
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.1 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 923 2005-11-15 08:51:15Z fperez $
9 $Id: iplib.py 924 2005-11-15 20:24:31Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -976,20 +976,26 b' class InteractiveShell(code.InteractiveConsole, Logger, Magic):'
976 976 This is called after the configuration files have been processed to
977 977 'finalize' the initialization."""
978 978
979 rc = self.rc
980
979 981 # Load readline proper
980 if self.rc.readline:
982 if rc.readline:
981 983 self.init_readline()
982 984
983 985 # Set user colors (don't do it in the constructor above so that it doesn't
984 986 # crash if colors option is invalid)
985 self.magic_colors(self.rc.colors)
987 self.magic_colors(rc.colors)
988
989 # Load user aliases
990 for alias in rc.alias:
991 self.magic_alias(alias)
986 992
987 993 # dynamic data that survives through sessions
988 994 # XXX make the filename a config option?
989 995 persist_base = 'persist'
990 if self.rc.profile:
991 persist_base += '_%s' % self.rc.profile
992 self.persist_fname = os.path.join(self.rc.ipythondir,persist_base)
996 if rc.profile:
997 persist_base += '_%s' % rc.profile
998 self.persist_fname = os.path.join(rc.ipythondir,persist_base)
993 999
994 1000 try:
995 1001 self.persist = pickle.load(file(self.persist_fname))
@@ -6,7 +6,7 b' Requires Python 2.1 or better.'
6 6
7 7 This file contains the main make_IPython() starter function.
8 8
9 $Id: ipmaker.py 923 2005-11-15 08:51:15Z fperez $"""
9 $Id: ipmaker.py 924 2005-11-15 20:24:31Z fperez $"""
10 10
11 11 #*****************************************************************************
12 12 # Copyright (C) 2001-2004 Fernando Perez. <fperez@colorado.edu>
@@ -592,10 +592,6 b" object? -> Details about 'object'. ?object also works, ?? prints more."
592 592 else:
593 593 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
594 594
595 # Load user aliases
596 for alias in IP_rc.alias:
597 IP.magic_alias(alias)
598
599 595 # release stdout and stderr and save config log into a global summary
600 596 msg.config.release_all()
601 597 if IP_rc.messages:
@@ -1,3 +1,9 b''
1 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/iplib.py (InteractiveShell.post_config_initialization):
4 Fix bug where a naked 'alias' call in the ipythonrc file would
5 cause a crash. Bug reported by Jorgen Stenarson.
6
1 7 2005-11-15 <Fernando.Perez@colorado.edu>
2 8
3 9 * IPython/ipmaker.py (make_IPython): cleanups which should improve
General Comments 0
You need to be logged in to leave comments. Login now