Merge pull request #29824 from abednarik/virtual_ret_dpkg_module

modules.dpkg: __virtual__ return err msg.
This commit is contained in:
Mike Place 2015-12-18 09:19:33 -07:00
commit da833b7a62

View File

@ -24,7 +24,10 @@ def __virtual__():
'''
Confirm this module is on a Debian based system
'''
return __virtualname__ if __grains__['os_family'] == 'Debian' else False
if __grains__['os_family'] == 'Debian':
return __virtualname__
return (False, 'The dpkg execution module cannot be loaded: '
'only works on Debian family systems.')
def bin_pkg_info(path, saltenv='base'):