Merge pull request #3485 from pypeclub/bugfix/macos_plist_read

General: Fix Plist loading for application launch
This commit is contained in:
Jakub Trllo 2022-07-12 17:23:21 +02:00 committed by GitHub
commit e58d83e530
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -665,7 +665,11 @@ class ApplicationExecutable:
if os.path.exists(plist_filepath):
import plistlib
parsed_plist = plistlib.readPlist(plist_filepath)
if hasattr(plistlib, "load"):
with open(plist_filepath, "rb") as stream:
parsed_plist = plistlib.load(stream)
else:
parsed_plist = plistlib.readPlist(plist_filepath)
executable_filename = parsed_plist.get("CFBundleExecutable")
if executable_filename: