def propset_dict(propset):
 if (propset is None):
  return {}
 return {prop.name: prop.val for prop in propset}

def propset_dict ( propset ) : if ( propset is None ) : return { } return { prop . name : prop . val for prop in propset }
turn a propset list into a dictionary propset is an optional attribute on objectcontent objects that are returned by the vmware api .