Bugfix: Restore boolean values from the repo configuration

This commit is contained in:
Bo Maryniuk 2016-05-06 12:29:48 +02:00
parent fb89877cf2
commit b746fa35f0

View file

@ -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 {}