We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1a74c5 commit 090ca57Copy full SHA for 090ca57
Lib/site.py
@@ -578,10 +578,10 @@ def register_readline():
578
def write_history():
579
try:
580
readline_module.write_history_file(history)
581
- except (FileNotFoundError, PermissionError):
+ except (FileNotFoundError, PermissionError, OSError) as e:
582
# home directory does not exist or is not writable
583
# https://bugs.python.org/issue19891
584
- pass
+ _warn(f'failed to open the history file for writing: {e}', RuntimeWarning)
585
586
atexit.register(write_history)
587
0 commit comments