mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Bugfix: Restore boolean values from the repo configuration
This commit is contained in:
parent
fb89877cf2
commit
b746fa35f0
1 changed files with 8 additions and 6 deletions
|
@ -608,12 +608,14 @@ def _get_repo_info(alias, repos_cfg=None):
|
|||
Get one repo meta-data.
|
||||
'''
|
||||
try:
|
||||
ret = dict((repos_cfg or _get_configured_repos()).items(alias))
|
||||
ret['alias'] = alias
|
||||
for key, val in six.iteritems(ret):
|
||||
if val == 'NONE':
|
||||
ret[key] = None
|
||||
return ret
|
||||
meta = dict((repos_cfg or _get_configured_repos()).items(alias))
|
||||
meta['alias'] = alias
|
||||
for key, val in six.iteritems(meta):
|
||||
if val in ['0', '1']:
|
||||
meta[key] = int(meta[key]) == 1
|
||||
elif val == 'NONE':
|
||||
meta[key] = None
|
||||
return meta
|
||||
except (ValueError, configparser.NoSectionError):
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue