Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[python] catch IOError in history

  • Loading branch information...
commit 5ea3c00d3589381da34939003da7fc8c9bd41c9c 1 parent 0983040
@elgenie authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.