Merge pull request #29958 from abednarik/virtual_ret_softwareupdate_module

modules.softwareupdate: __virtual__ return err msg.
This commit is contained in:
Mike Place 2015-12-22 14:39:57 -07:00
commit 2826403a9e

View File

@ -19,7 +19,10 @@ def __virtual__():
'''
Only for MacOS
'''
return __virtualname__ if __grains__['os'] == 'MacOS' else False
if __grains__['os'] == 'MacOS':
return __virtualname__
return (False, 'The softwareupdate module could not be loaded: '
'module only works on MacOS systems.')
def _get_upgradable(rec=False, restart=False):