def addOrRemoveOptionalSoftware(self): # record any requested changes in installed/removal state # then kick off an update check optional_install_choices = {} optional_install_choices['managed_installs'] = [] optional_install_choices['managed_uninstalls'] = [] for row in self.optional_array_controller.arrangedObjects(): if row['managed']: # user selected for install optional_install_choices['managed_installs'].append(row['itemname']) elif row['original_managed']: # was managed, but user deselected it; we should remove it if possible optional_install_choices['managed_uninstalls'].append(row['itemname']) munki.writeSelfServiceManifest(optional_install_choices) self.checkForUpdates()
def _save_self_service_choices(self): current_choices = {} current_choices['managed_installs'] = list(self._installs) current_choices['managed_uninstalls'] = list(self._uninstalls) if not munki.writeSelfServiceManifest(current_choices): raise SelfServiceError( 'Could not save self-service choices to %s' % munki.WRITEABLE_SELF_SERVICE_MANIFEST_PATH)
def addOrRemoveOptionalSoftware(self): # record any requested changes in installed/removal state # then kick off an update check optional_install_choices = {} optional_install_choices['managed_installs'] = [] optional_install_choices['managed_uninstalls'] = [] for row in self.optional_array_controller.arrangedObjects(): if row['managed']: # user selected for install optional_install_choices['managed_installs'].append( row['itemname']) elif row['original_managed']: # was managed, but user deselected it; we should remove it if possible optional_install_choices['managed_uninstalls'].append( row['itemname']) munki.writeSelfServiceManifest(optional_install_choices) self.checkForUpdates()
def _save_self_service_choices(self): current_choices = {} current_choices['managed_installs'] = list(self._installs) current_choices['managed_uninstalls'] = list(self._uninstalls) munki.writeSelfServiceManifest(current_choices)