mirror of
https://github.com/munki/munki.git
synced 2026-04-22 04:28:21 -05:00
Fixed getManagedInstallPrefs() to actually read the preferences file (broke it in last commit).
git-svn-id: http://munki.googlecode.com/svn/trunk@175 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -291,7 +291,7 @@ def getManagedInstallsPrefs():
|
||||
pl = {}
|
||||
if os.path.exists(prefsfile):
|
||||
try:
|
||||
pl = readPlist(prefsfile)
|
||||
pl = FoundationPlist.readPlist(prefsfile)
|
||||
for key in pl.keys():
|
||||
if type(pl[key]).__name__ == "__NSCFDate":
|
||||
# convert NSDate/CFDates to strings
|
||||
@@ -299,7 +299,9 @@ def getManagedInstallsPrefs():
|
||||
else:
|
||||
prefs[key] = pl[key]
|
||||
except:
|
||||
pass
|
||||
display_error("ERROR: Problem reading %s. Using defaults." % prefsfile)
|
||||
else:
|
||||
display_error("WARNING: No prefs file found at %s. Using defaults." % prefsfile)
|
||||
|
||||
return prefs
|
||||
|
||||
@@ -405,7 +407,7 @@ def getExtendedVersion(bundlepath):
|
||||
return shortVers + "." + sourceVers + "." + buildVers
|
||||
|
||||
if os.path.exists(infoPlist):
|
||||
pl = FoundationPlist.readPlist(infoPlist)
|
||||
pl = FoundationPlist.(infoPlist)
|
||||
if "CFBundleShortVersionString" in pl:
|
||||
return padVersionString(pl["CFBundleShortVersionString"],5)
|
||||
elif "Bundle versions string, short" in pl:
|
||||
|
||||
Reference in New Issue
Block a user