mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix __opts__ and provider being None issue
This commit is contained in:
parent
b14faf1c68
commit
a452cded20
1 changed files with 4 additions and 2 deletions
|
@ -577,8 +577,10 @@ def get_location(opts=None, provider=None):
|
|||
DEFAULT_LOCATION
|
||||
'''
|
||||
if opts is None:
|
||||
opts = __opts__
|
||||
ret = opts.get('location', provider.get('location'))
|
||||
opts = {}
|
||||
ret = opts.get('location')
|
||||
if ret is None and provider is not None:
|
||||
ret = provider.get('location')
|
||||
if ret is None:
|
||||
ret = get_region_from_metadata()
|
||||
if ret is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue