-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: plistlib.loads #696
base: master
Are you sure you want to change the base?
Conversation
plistlib.readPlist -> plistlib.loads add read_bytes of from pathlib import Path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go all-in on pathlib...
info_plist = plistlib.loads((Path(sys.executable).parent / "Info.plist").read_bytes())
scripts/sysinfo.py
Outdated
@@ -12,7 +13,8 @@ def get_pythonista_version_info(): | |||
|
|||
try: | |||
plist_path = os.path.abspath(os.path.join(sys.executable, '..', 'Info.plist')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plist_path = os.path.abspath(os.path.join(sys.executable, '..', 'Info.plist')) |
scripts/sysinfo.py
Outdated
plist_data = Path(plist_path).read_bytes() | ||
plist = plistlib.loads(plist_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plist_data = Path(plist_path).read_bytes() | |
plist = plistlib.loads(plist_data) | |
info_plist = plistlib.loads((Path(sys.executable).parent / "Info.plist").read_bytes()) |
Thank you! Very smart now! |
#695
plistlib.readPlist
->plistlib.loads
add
read_bytes
offrom pathlib import Path