Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-39468: Improve the site module's error handling while writing .python_history #18299
Conversation
This comment has been minimized.
This comment has been minimized.
I'd title it "errno not returned for some errors in write_history, append_history, and history_truncate_file". In particular these calls return -1 when the internal if (rv == 0 && histname && tempname)
rv = histfile_restore (tempname, histname);
if (rv != 0)
{
if (tempname)
unlink (tempname);
history_lines_written_to_file = 0;
} This needs a simple fix to update the value of if (rv == 0 && histname && tempname)
rv = histfile_restore (tempname, histname);
if (rv != 0) {
rv = errno;
if (tempname)
unlink(tempname);
history_lines_written_to_file = 0;
} |
This comment has been minimized.
This comment has been minimized.
codecov
bot
commented
Jan 31, 2020
Codecov Report
@@ Coverage Diff @@
## master #18299 +/- ##
==========================================
- Coverage 82.20% 82.12% -0.08%
==========================================
Files 1957 1954 -3
Lines 589079 583367 -5712
Branches 44401 44401
==========================================
- Hits 484247 479093 -5154
+ Misses 95174 94636 -538
+ Partials 9658 9638 -20
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
I still want to notice the users that the .python_history file is not writable, so that they wouldn't guess there's something wrong somewhere else. |
opensource-assist commentedJan 31, 2020
•
edited by bedevere-bot
https://bugs.python.org/issue39468