Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ def register_readline():
def write_history():
try:
readline_module.write_history_file(history)
except (FileNotFoundError, PermissionError):
except (FileNotFoundError, PermissionError, OSError) as e:
# home directory does not exist or is not writable
# https://bugs.python.org/issue19891
pass
_warn(f'failed to open the history file for writing: {e}', RuntimeWarning)

atexit.register(write_history)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed pyrepl history saving on read-only file systems.
Loading