summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 8ad3f7ba..ab72f1a6 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3989,7 +3989,10 @@ class Cmd(cmd.Cmd):
self.history.clear()
if self.persistent_history_file:
- os.remove(self.persistent_history_file)
+ try:
+ os.remove(self.persistent_history_file)
+ except FileNotFoundError:
+ pass
if rl_type != RlType.NONE:
readline.clear_history()