From 436702ad01e6342c4e9412490ad0484f428e03ff 2008-03-08 06:40:46 From: Ville M. Vainio Date: 2008-03-08 06:40:46 Subject: [PATCH] catch & ignore missing readline.clear_history --- diff --git a/IPython/iplib.py b/IPython/iplib.py index a737855..c62761b 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -1268,8 +1268,12 @@ want to merge them back into the new files.""" % locals() """Reload the input history from disk file.""" if self.has_readline: - self.readline.clear_history() - self.readline.read_history_file(self.shell.histfile) + try: + self.readline.clear_history() + self.readline.read_history_file(self.shell.histfile) + except AttributeError: + pass + def history_saving_wrapper(self, func): """ Wrap func for readline history saving