Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b2499669
Commit
b2499669
authored
Aug 06, 2018
by
Anthony Sottile
Committed by
INADA Naoki
Aug 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-19891: Ignore error while writing history file (GH-8483)
parent
336c9458
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Lib/site.py
Lib/site.py
+10
-1
Misc/NEWS.d/next/Library/2018-07-26-08-45-49.bpo-19891.Y-3IiB.rst
...S.d/next/Library/2018-07-26-08-45-49.bpo-19891.Y-3IiB.rst
+2
-0
No files found.
Lib/site.py
View file @
b2499669
...
...
@@ -439,7 +439,16 @@ def enablerlcompleter():
readline
.
read_history_file
(
history
)
except
OSError
:
pass
atexit
.
register
(
readline
.
write_history_file
,
history
)
def
write_history
():
try
:
readline
.
write_history_file
(
history
)
except
(
FileNotFoundError
,
PermissionError
):
# home directory does not exist or is not writable
# https://bugs.python.org/issue19891
pass
atexit
.
register
(
write_history
)
sys
.
__interactivehook__
=
register_readline
...
...
Misc/NEWS.d/next/Library/2018-07-26-08-45-49.bpo-19891.Y-3IiB.rst
0 → 100644
View file @
b2499669
Ignore errors caused by missing / non-writable homedir while writing history
during exit of an interactive session. Patch by Anthony Sottile.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment