Bugfix: return boolean only for 'isbase' and 'installed' attributes

This commit is contained in:
Bo Maryniuk 2016-07-15 17:11:31 +02:00
parent 764f56f711
commit 337eee33ac

View file

@ -1543,7 +1543,10 @@ def list_products(all=False, refresh=False):
for prd in product_list[0].getElementsByTagName('product'):
p_nfo = dict()
for k_p_nfo, v_p_nfo in prd.attributes.items():
p_nfo[k_p_nfo] = k_p_nfo not in ['isbase', 'installed'] and v_p_nfo or v_p_nfo in ['true', '1']
if k_p_nfo in ['isbase', 'installed']:
p_nfo[k_p_nfo] = bool(v_p_nfo in ['true', '1'])
elif v_p_nfo:
p_nfo[k_p_nfo] = v_p_nfo
eol = prd.getElementsByTagName('endoflife')
if eol: