From d8287834ddacf040f108186c203e3593096ca8f5 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 23 Apr 2019 16:39:30 +0300 Subject: [PATCH] init.py: Hide errors during `.write_history_file()` --- lib/python/init.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/python/init.py b/lib/python/init.py index 1a91f04..8720caa 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -64,7 +64,10 @@ def init(): histfile = histfiles[-1] histfile = os.path.expandvars(histfile) histfile = os.path.expanduser(histfile) - readline.write_history_file(histfile) + try: + readline.write_history_file(histfile) + except IOError: + pass import atexit atexit.register(savehist) -- 2.39.5