From cb1986230f78a936a905378f1aed92a4c67dba6d 2014-05-16 22:57:03 From: Thomas Kluyver Date: 2014-05-16 22:57:03 Subject: [PATCH] Close database when HistorySavingThread stops --- diff --git a/IPython/core/history.py b/IPython/core/history.py index da10813..c9b8435 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -775,6 +775,7 @@ class HistorySavingThread(threading.Thread): while True: self.history_manager.save_flag.wait() if self.stop_now: + self.db.close() return self.history_manager.save_flag.clear() self.history_manager.writeout_cache(self.db)