def _glsa_list_process_output(output):
 ret = dict()
 for line in output:
  try:
   (glsa_id, status, desc) = line.split(None, 2)
   if ('U' in status):
    status += ' Not Affected'
   elif ('N' in status):
    status += ' Might be Affected'
   elif ('A' in status):
    status += ' Applied (injected)'
   if ('CVE' in desc):
    (desc, cves) = desc.rsplit(None, 1)
    cves = cves.split(',')
   else:
    cves = list()
   ret[glsa_id] = {'description': desc, 'status': status, 'CVEs': cves}
  except ValueError:
   pass
 return ret

def _glsa_list_process_output ( output ) : ret = dict ( ) for line in output : try : ( glsa_id , status , desc ) = line . split ( None , 2 ) if ( 'U' in status ) : status += ' Not Affected' elif ( 'N' in status ) : status += ' Might be Affected' elif ( 'A' in status ) : status += ' Applied (injected)' if ( 'CVE' in desc ) : ( desc , cves ) = desc . rsplit ( None , 1 ) cves = cves . split ( ',' ) else : cves = list ( ) ret [ glsa_id ] = { 'description' : desc , 'status' : status , 'CVEs' : cves } except ValueError : pass return ret
process output from glsa_check_list into a dict returns a dict containing the glsa id .