bpo-19891: Ignore error while writing history file (GH-8483)

(cherry picked from commit b2499669ef2e6dc9a2cdb49b4dc498e078167e26)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2 files changed