Don't check AppleUpdates.plist for forced updates if neither InstallAppleSoftwareUpdates or AppleSoftwareUpdatesOnly preferences are true

This commit is contained in:
Greg Neagle
2020-04-14 17:11:09 -07:00
parent 5419366bfc
commit 0ac6fbd3b6

View File

@@ -43,7 +43,7 @@ try:
_ = xrange # pylint: disable=xrange-builtin
except NameError:
# no xrange in Python 3
xrange = range
xrange = range # pylint: disable=redefined-builtin,invalid-name
# This many hours before a force install deadline, start notifying the user.
@@ -239,10 +239,11 @@ def force_install_package_check():
managed_install_dir = prefs.pref('ManagedInstallDir')
installinfo_types = {
'InstallInfo.plist' : 'managed_installs',
'AppleUpdates.plist': 'AppleUpdates'
}
installinfo_types = {'InstallInfo.plist': 'managed_installs'}
if (prefs.pref('InstallAppleSoftwareUpdates') or
prefs.pref('AppleSoftwareUpdatesOnly')):
# only consider Apple updates if the prefs say it's OK
installinfo_types['AppleUpdates.plist'] = 'AppleUpdates'
now = NSDate.date()
now_xhours = NSDate.dateWithTimeIntervalSinceNow_(