def stringify(pkgs):
 try:
  for key in pkgs:
   pkgs[key] = ','.join(pkgs[key])
 except AttributeError as exc:
  log.exception(exc)

def stringify ( pkgs ) : try : for key in pkgs : pkgs [ key ] = ',' . join ( pkgs [ key ] ) except AttributeError as exc : log . exception ( exc )
takes a dict of package name/version information and joins each list of installed versions into a string .