mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Bugfix: return boolean only for 'isbase' and 'installed' attributes
This commit is contained in:
parent
764f56f711
commit
337eee33ac
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue