mirror of
https://github.com/munki/munki.git
synced 2026-04-22 12:38:23 -05:00
Merge branch 'master' into curl-refactor
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user