Commit c702bded authored by Jérome Perrin's avatar Jérome Perrin

client/console: don't fail writing history file when ~ is deleted

/reviewed-on nexedi/slapos.core!52
parent 5ff4cb4f
......@@ -139,6 +139,7 @@ def do_console(local):
historyPath = os.path.expanduser("~/.slapconsolehistory")
def save_history(historyPath=historyPath):
if os.path.exists(os.path.dirname(historyPath)):
readline.write_history_file(historyPath)
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment