Merge branch 'master' into curl-refactor

This commit is contained in:
Greg Neagle
2012-01-19 08:39:51 -08:00
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -2479,10 +2479,21 @@ def check(client_id='', localmanifestpath=None):
installinfochanged = True
installinfopath = os.path.join(ManagedInstallDir, 'InstallInfo.plist')
if os.path.exists(installinfopath):
oldinstallinfo = FoundationPlist.readPlist(installinfopath)
try:
oldinstallinfo = FoundationPlist.readPlist(installinfopath)
except FoundationPlist.NSPropertyListSerializationException:
oldinstallinfo = None
munkicommon.display_error(
'Could not read InstallInfo.plist. Deleting...')
try:
os.unlink(installinfopath)
except OSError, e:
munkicommon.display_error(
'Failed to delete InstallInfo.plist: %s', str(e))
if oldinstallinfo == installinfo:
installinfochanged = False
munkicommon.display_detail('No change in InstallInfo.')
if installinfochanged:
FoundationPlist.writePlist(installinfo,
os.path.join(ManagedInstallDir,
+1 -1
View File
@@ -91,7 +91,7 @@ def verifyFileOnlyWritableByMunkiAndRoot(file_path):
'%s is not secure! %s' % (file_path, e.args[0]))
def runExternalScript(script, allow_insecure=False, script_args=[]):
def runExternalScript(script, allow_insecure=False, script_args=()):
"""Run a script (e.g. preflight/postflight) and return its exit status.
Args: