Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't seem like there was a populated salt dunder within the #32677

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions salt/utils/boto.py
Expand Up @@ -41,6 +41,7 @@ def test():
import sys
from distutils.version import LooseVersion as _LooseVersion # pylint: disable=import-error,no-name-in-module
from functools import partial
from salt.loader import minion_mods

# Import salt libs
from salt.ext.six import string_types # pylint: disable=import-error
Expand All @@ -63,7 +64,7 @@ def test():

log = logging.getLogger(__name__)

__salt__ = {}
__salt__ = None


def __virtual__():
Expand All @@ -78,6 +79,9 @@ def __virtual__():
elif _LooseVersion(boto.__version__) < _LooseVersion(required_boto_version):
return False
else:
global __salt__
if not __salt__:
__salt__ = minion_mods(__opts__)
return True


Expand All @@ -89,7 +93,7 @@ def _get_profile(service, region, key, keyid, profile):
_profile = profile
key = _profile.get('key', None)
keyid = _profile.get('keyid', None)
region = _profile.get('region', None)
region = _profile.get('region', region or None)
if not region and __salt__['config.option'](service + '.region'):
region = __salt__['config.option'](service + '.region')

Expand Down