summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2021-01-29 19:48:10 -0500
committerGitHub <noreply@github.com>2021-01-29 19:48:10 -0500
commitcd377071cd122bc92a829322e00ae43fd5a5c254 (patch)
tree7f42c3c3e81d769d7680b9f1ba8740e9f807b079 /cmd2/cmd2.py
parent2055dfc9a601d6f2b78e44690aeff475c79369d3 (diff)
parent246ce9de04e16b39c123a05426b90859af2a4251 (diff)
downloadcmd2-git-cd377071cd122bc92a829322e00ae43fd5a5c254.tar.gz
Merge pull request #1050 from python-cmd2/misc
Miscellaneous changes for the next release (1.4.1)
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index ab72f1a6..51670235 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3993,6 +3993,9 @@ class Cmd(cmd.Cmd):
os.remove(self.persistent_history_file)
except FileNotFoundError:
pass
+ except OSError as ex:
+ self.pexcept("Error removing history file '{}': {}".format(self.persistent_history_file, ex))
+ return
if rl_type != RlType.NONE:
readline.clear_history()