diff --git a/objets.py b/objets.py index 19d536a..fc76290 100644 --- a/objets.py +++ b/objets.py @@ -739,7 +739,7 @@ class proprio(CransLdapObject): attributs.finConnexion] def __repr__(self): - return str(self.__class__) + " : nom=" + str(self['nom'][0]) + return str(self.__class__.__name__) + " : nom=" + str(self['nom'][0]) def __init__(self, *args, **kwargs): super(proprio, self).__init__(*args, **kwargs) @@ -998,7 +998,7 @@ class machine(CransLdapObject): attributs.dnsIpv6, attributs.machineAlias] def __repr__(self): - return str(self.__class__) + " : host=" + str(self['host'][0]) + return str(self.__class__.__name__) + " : host=" + str(self['host'][0]) def __init__(self, *args, **kwargs): super(machine, self).__init__(*args, **kwargs) @@ -1168,10 +1168,14 @@ class AssociationCrans(proprio): def delete(self, comm, login): pass def __repr__(self): - return str(self.__class__) + " : Le Crans" + return str(self.__class__.__name__) + " : Le Crans" class BaseInvites(proprio): u"""Un artefact de la base ldap""" + + def __repr__(self): + return str(self.__class__.__name__) + def delete(self, comm, login): raise EnvironmentError("Les pauvres invites") @@ -1313,7 +1317,7 @@ class facture(CransLdapObject): _proprio = None def __repr__(self): - return str(self.__class__) + " : fid=" + str(self['fid'][0]) + return str(self.__class__.__name__) + " : fid=" + str(self['fid'][0]) #### GROS HACK pour rester comptatible avec ldap_crans où l'article representant les frais n'est ajouté qu'une fois le paiement reçu def __init__(self, *args, **kwargs): @@ -1440,7 +1444,10 @@ class baseCert(CransLdapObject): _machine = None def __repr__(self): - return str(self.__class__) + " : xid=" + str(self['xid'][0]) + if self['info']: + return "Certificat : %s (xid=%s)" % (self['info'][0], str(self['xid'][0])) + else: + return "Certificat : xid=" + str(self['xid'][0]) def update_attribs(self): if "TLSACert" in self['objectClass']: