appleupdates.py: NSURL fileSystemRepresentation() not available on 10.8 and earlier, leading to a crash. Replace with NSURL path().

This commit is contained in:
Greg Neagle
2016-04-07 10:45:33 -07:00
parent a9b421525c
commit 8d5b53b7a7
+2 -2
View File
@@ -505,8 +505,8 @@ class AppleUpdates(object):
for app_id in set(must_close_app_ids):
dummy_resultcode, dummy_fileref, nsurl = LSFindApplicationForInfo(
0, app_id, None, None, None)
if nsurl:
pathname = nsurl.fileSystemRepresentation()
if nsurl and nsurl.isFileURL():
pathname = nsurl.path()
dirname = os.path.dirname(pathname)
executable = munkicommon.getAppBundleExecutable(pathname)
if executable: