Skip to content

Commit

Permalink
Keep using pickle protocol version 2 (nvaccess#7105)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienCochuyt committed Sep 20, 2019
1 parent 0e4bb4a commit 1099f92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/addonHandler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def saveState():
try:
# #9038: Python 3 requires binary format when working with pickles.
with open(statePath, "wb") as f:
pickle.dump(state, f)
pickle.dump(state, f, protocol=2)
except:
log.debugWarning("Error saving state", exc_info=True)

Expand Down
2 changes: 1 addition & 1 deletion source/updateCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def saveState():
try:
# #9038: Python 3 requires binary format when working with pickles.
with open(_stateFilename, "wb") as f:
pickle.dump(state, f)
pickle.dump(state, f, protocol=2)
except:
log.debugWarning("Error saving state", exc_info=True)

Expand Down

0 comments on commit 1099f92

Please sign in to comment.