summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-06-14 11:03:52 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-06-14 11:28:25 -0400
commitfc2e7a93b02e75fd0b2a49998aa4ed33bf4a1189 (patch)
tree8a1b958ce033038acac1a2f0f5977ba75c8010d1
parentd0b69ecf4cdf880bbc54b41fe9c281cf9a1b7723 (diff)
downloadcmd2-git-fc2e7a93b02e75fd0b2a49998aa4ed33bf4a1189.tar.gz
Updated error message when invalid persistent history file is read
-rw-r--r--cmd2/cmd2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index de0621bf..72d93f49 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -4484,7 +4484,10 @@ class Cmd(cmd.Cmd):
self.perror(f"Cannot read persistent history file '{hist_file}': {ex}")
return
except (json.JSONDecodeError, lzma.LZMAError, KeyError, UnicodeDecodeError, ValueError) as ex:
- self.perror(f"Error processing persistent history file '{hist_file}': {ex}")
+ self.perror(
+ f"Error processing persistent history file '{hist_file}': {ex}\n"
+ f"The history file will be recreated when this application exits."
+ )
self.history.start_session()
self.persistent_history_file = hist_file