After doing unattended installs, don't recheck Apple updates availability if there were none available when we started (or we weren't supposed to check them at all)

This commit is contained in:
Greg Neagle
2016-06-29 17:05:23 -04:00
parent 465c60b5f8
commit fa8895429e
+13 -10
View File
@@ -921,16 +921,19 @@ def main():
# so we need to check InstallInfo.plist and
# AppleUpdates.plist again
updatesavailable = munkiUpdatesAvailable()
try:
appleupdatesavailable = \
appleupdates.appleSoftwareUpdatesAvailable(
suppresscheck=True, client_id=options.id)
except:
munkicommon.display_error(
'Unexpected error in appleupdates:')
munkicommon.log(traceback.format_exc())
munkicommon.savereport()
raise
if appleupdatesavailable:
# there were Apple updates available, but we might have
# installed some unattended
try:
appleupdatesavailable = (
appleupdates.appleSoftwareUpdatesAvailable(
suppresscheck=True, client_id=options.id))
except:
munkicommon.display_error(
'Unexpected error in appleupdates:')
munkicommon.log(traceback.format_exc())
munkicommon.savereport()
raise
if appleupdatesavailable or updatesavailable:
# set a flag to notify the user of available updates
# after we conclude this run.