##// END OF EJS Templates
fallback to in-memory if creating new history session fails
Min RK -
Show More
@@ -513,12 +513,18 b' class HistoryManager(HistoryAccessor):'
513 self.save_flag = threading.Event()
513 self.save_flag = threading.Event()
514 self.db_input_cache_lock = threading.Lock()
514 self.db_input_cache_lock = threading.Lock()
515 self.db_output_cache_lock = threading.Lock()
515 self.db_output_cache_lock = threading.Lock()
516
517 try:
518 self.new_session()
519 except OperationalError:
520 self.log.error("Failed to create history session in %s. History will not be saved.",
521 self.hist_file, exc_info=True)
522 self.hist_file = ':memory:'
523
516 if self.enabled and self.hist_file != ':memory:':
524 if self.enabled and self.hist_file != ':memory:':
517 self.save_thread = HistorySavingThread(self)
525 self.save_thread = HistorySavingThread(self)
518 self.save_thread.start()
526 self.save_thread.start()
519
527
520 self.new_session()
521
522 def _get_hist_file_name(self, profile=None):
528 def _get_hist_file_name(self, profile=None):
523 """Get default history file name based on the Shell's profile.
529 """Get default history file name based on the Shell's profile.
524
530
General Comments 0
You need to be logged in to leave comments. Login now