def _parse_subject(subject):
 ret = {}
 nids = []
 for (nid_name, nid_num) in six.iteritems(subject.nid):
  if (nid_num in nids):
   continue
  val = getattr(subject, nid_name)
  if val:
   ret[nid_name] = val
   nids.append(nid_num)
 return ret

def _parse_subject ( subject ) : ret = { } nids = [ ] for ( nid_name , nid_num ) in six . iteritems ( subject . nid ) : if ( nid_num in nids ) : continue val = getattr ( subject , nid_name ) if val : ret [ nid_name ] = val nids . append ( nid_num ) return ret
returns a dict containing all values in an x509 subject .