Skip to content
Browse files

[python] catch IOError in history

  • Loading branch information...
1 parent 0983040 commit 5ea3c00d3589381da34939003da7fc8c9bd41c9c @elgenie committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/pythonrc
View
4 python/pythonrc
@@ -10,7 +10,9 @@ import time
import timeit
history = os.path.expanduser('~/.python_history')
-readline.read_history_file(history)
+try:
+ readline.read_history_file(history)
+except IOError: pass
readline.parse_and_bind('tab: complete')
atexit.register(readline.write_history_file, history)

0 comments on commit 5ea3c00

Please sign in to comment.
Something went wrong with that request. Please try again.