]> git.phdru.name Git - dotfiles.git/blobdiff - lib/python/init.py
init.py: Hide errors during `.write_history_file()`
[dotfiles.git] / lib / python / init.py
index 1a91f049395ecceb52dee640983f53d3b18cedd2..8720caa9bf1120075310a8a54296704b47e7332b 100644 (file)
@@ -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)