Adding support for skipHidden in SetInclude

`skipHidden` skips hidden updates accordingly, but any changes to the 'hidden' key:value in the `includes` parameter won't be reflected in the object's variable `self.skipHidden` as `SetInclude` ignores that. This commit fixes that.

Consistent with salt.module.win_update

See https://github.com/saltstack/salt/issues/30081 for more information.
This commit is contained in:
Michele Preziuso 2016-01-29 09:19:55 +00:00
parent 4f2d4af2e7
commit ccf5e13e7d

View file

@ -312,13 +312,15 @@ class PyWinUpdater(object):
self.skipReboot = state
elif include == 'present':
self.skipPresent = state
elif include == 'hidden':
self.skipHidden = state
elif include == 'software':
self.skipSoftwareUpdates = state
elif include == 'driver':
self.skipDriverUpdates = state
log.debug('new search state: \n\tUI: {0}\n\tDownload: {1}\n\tInstalled: {2}\n\treboot :{3}\n\tPresent: {4}\n\tsoftware: {5}\n\tdriver: {6}'.format(
log.debug('new search state: \n\tUI: {0}\n\tDownload: {1}\n\tInstalled: {2}\n\treboot :{3}\n\tPresent: {4}\n\thidden: {5}\n\tsoftware: {6}\n\tdriver: {7}'.format(
self.skipUI, self.skipDownloaded, self.skipInstalled, self.skipReboot,
self.skipPresent, self.skipSoftwareUpdates, self.skipDriverUpdates))
self.skipPresent, self.skipHidden, self.skipSoftwareUpdates, self.skipDriverUpdates))
def _search(win_updater, retries=5):