mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-17 10:10:31 +00:00
Fix __salt__ unavailable in __virtual__()
In older versions of Salt (this was originally developed against 2015.2), __salt__ isn't loaded yet in the __virtual__() function. Work around this by just duplicating the check from upstream postgres.py
This commit is contained in:
parent
eda4cf69ae
commit
5015024725
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ def __virtual__():
|
|||
'''
|
||||
Only load this module if the postgres module is already loaded
|
||||
'''
|
||||
if 'postgres.psql_query' in __salt__:
|
||||
if all((salt.utils.which('psql'), HAS_ALL_IMPORTS)):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue