mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix lint errors and code factorization
This commit is contained in:
parent
8aa35989ab
commit
819c46cb87
1 changed files with 2 additions and 11 deletions
|
@ -81,20 +81,11 @@ def __virtual__():
|
|||
|
||||
osrelease_major = __grains__.get('osrelease_info', [0])[0]
|
||||
|
||||
if __grains__['os'] == 'XenServer':
|
||||
if __grains__['os'] in ('XenServer', 'XCP-ng'):
|
||||
if osrelease_major >= 7:
|
||||
return (
|
||||
False,
|
||||
'XenServer >= 7 uses systemd, will not load rh_service.py '
|
||||
'as virtual \'service\''
|
||||
)
|
||||
return __virtualname__
|
||||
|
||||
if __grains__['os'] == 'XCP-ng':
|
||||
if osrelease_major >= 7:
|
||||
return (
|
||||
False,
|
||||
'XCP-ng >= 7 uses systemd, will not load rh_service.py '
|
||||
'XenServer and XCP-ng >= 7 use systemd, will not load rh_service.py '
|
||||
'as virtual \'service\''
|
||||
)
|
||||
return __virtualname__
|
||||
|
|
Loading…
Add table
Reference in a new issue