From c1371f4f228e60ffc691f81d6be558ba09772385 2013-07-15 20:50:37 From: MinRK Date: 2013-07-15 20:50:37 Subject: [PATCH] Don't require HistoryManager to have a shell Allows use of HistoryManager to work with history database without a shell instance present. --- diff --git a/IPython/core/history.py b/IPython/core/history.py index 7572f20..6104ba7 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -634,8 +634,9 @@ class HistoryManager(HistoryAccessor): '_ii': self._ii, '_iii': self._iii, new_i : self._i00 } - - self.shell.push(to_main, interactive=False) + + if self.shell is not None: + self.shell.push(to_main, interactive=False) def store_output(self, line_num): """If database output logging is enabled, this saves all the