This repository was archived by the owner on Oct 9, 2023. It is now read-only.
Repository navigation
Prefs Read/Write Fix - #79
Merged
Merged
Conversation
Fix to preference read/write, following removal of plistlib.readPlist() and plistlib.writePlist() from Python 3.8.
chilcote
reviewed
Oct 22, 2020
chilcote
left a comment
Owner
There was a problem hiding this comment.
Fixe those two and it looks reasonable to me. Thanks!
| prefs["override_login_once"] = override_items | ||
| plistlib.writePlist(prefs, outset_preferences) | ||
| with open(outset_preferences, 'wb') as fp: | ||
| prefs = plistlib.dump(fp) |
Owner
There was a problem hiding this comment.
forgot to pass prefs to plistlib.dump here
Owner
There was a problem hiding this comment.
change to plistlib.dump(prefs, fp)
| del prefs["override_login_once"][script] | ||
| plistlib.writePlist(prefs, outset_preferences) | ||
| with open(outset_preferences, 'wb') as fp: | ||
| prefs = plistlib.dump(fp) |
Owner
There was a problem hiding this comment.
same here
change to plistlib.dump(prefs, fp)
Author
|
I’m running a system update on my laptop at the moment, so can’t fix those issues right now, unfortunately. Could you maybe fix them at your end, if you have a moment? |
Had forgotten to pass prefs to plistlib.dump().
Author
|
Laptop update finished. Fixed those two issues. Sorry about that- silly mistakes... |
Owner
|
Looks good to me. I'll merge, and then we can get feedback from others to make sure no one finds any other edge cases. Thanks a lot for putting this together. |
Author
|
Great! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix to preference read/write, following removal of plistlib.readPlist() and plistlib.writePlist() from Python 3.8.