mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28579 from jfindlay/virt_ret
fix __virtual__ returns: tls,uptime mods
This commit is contained in:
commit
7ca7ed4b37
3 changed files with 5 additions and 5 deletions
|
@ -156,8 +156,8 @@ def __virtual__():
|
|||
return True
|
||||
else:
|
||||
X509_EXT_ENABLED = False
|
||||
return False, ['PyOpenSSL version 0.10 or later must be installed '
|
||||
'before this module can be used.']
|
||||
return (False, ('PyOpenSSL version 0.10 or later must be installed '
|
||||
'before this module can be used.'))
|
||||
|
||||
|
||||
def cert_base_path(cacert_path=None):
|
||||
|
|
|
@ -26,7 +26,7 @@ def __virtual__():
|
|||
'''
|
||||
if ENABLED:
|
||||
return 'uptime'
|
||||
return False, ['uptime module needs the python requests module to work']
|
||||
return (False, 'uptime module needs the python requests module to work')
|
||||
|
||||
|
||||
def create(name, **params):
|
||||
|
|
|
@ -655,8 +655,8 @@ class TLSAddTestCase(TestCase):
|
|||
'OpenSSL_version': LooseVersion('0.1.1'),
|
||||
'X509_EXT_ENABLED': False}):
|
||||
self.assertEqual(tls.__virtual__(),
|
||||
(False, ['PyOpenSSL version 0.10 or later must be installed '
|
||||
'before this module can be used.']))
|
||||
(False, 'PyOpenSSL version 0.10 or later must be installed '
|
||||
'before this module can be used.'))
|
||||
with patch.dict(tls.__salt__, {'pillar.get': mock_pgt}):
|
||||
self.assertRaises(AssertionError, tls.get_extensions, 'server')
|
||||
self.assertRaises(AssertionError, tls.get_extensions, 'client')
|
||||
|
|
Loading…
Add table
Reference in a new issue