From: Oleg Broytman Date: Tue, 23 Apr 2019 13:39:30 +0000 (+0300) Subject: init.py: Hide errors during `.write_history_file()` X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=d8287834ddacf040f108186c203e3593096ca8f5;ds=sidebyside init.py: Hide errors during `.write_history_file()` --- 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)