[ldap_crans, deconnexion] print u"" == stupide

Ignore-this: a20c00ec570810fc4a73c73dabdc5a42

darcs-hash:20120718144634-ffbb2-a463a1a7705e2a81a9a88710a8fcaf97ffac871d.gz
This commit is contained in:
Nicolas Dandrimont 2012-07-18 16:46:34 +02:00
parent a1a24dd5bd
commit 25a68cd4dc
2 changed files with 8 additions and 8 deletions

View file

@ -3810,12 +3810,12 @@ class _FakeProprio(CransLdap):
return ''
def blacklist(self, new=None):
if new is not None:
print >>sys.stderr, u"Tentative d'ajout de blacklist à un propriétaire virtuel :".encode(sys.stderr.encoding)
print >>sys.stderr, "Tentative d'ajout de blacklist à un propriétaire virtuel :"
try:
print >>sys.stderr, (u"Nom : %s" % self.Nom()).encode(sys.stderr.encoding)
print >>sys.stderr, "Nom : %s" % self.Nom()
except AttributeError:
print >>sys.stderr, u"Impossible de récupérer le nom...".encode(sys.stderr.encoding)
print >>sys.stderr, u"Blacklist :"
print >>sys.stderr, "Impossible de récupérer le nom..."
print >>sys.stderr, "Blacklist :"
print >>sys.stderr, new
return []
def paiement(self):
@ -3838,11 +3838,11 @@ class AssociationCrans(_FakeProprio):
def __init__(self, conn=None):
_FakeProprio.__init__(self, conn)
def Nom(self):
return u"Crans"
return "Crans"
def chbre(self):
return u"CRA"
return "CRA"
def email(self):
return u"roots@crans.org"
return "roots@crans.org"
db = None

View file

@ -339,7 +339,7 @@ for ip, nombre in infectes:
machine = ldap.search('ipHostNumber=%s' % ip, 'w' )['machine'][0]
except IndexError :
# Dans le cas où l'ip détectée n'est pas enregistrée
print u"La machine avec l'ip %s n'est pas declaree !" % ip
print "La machine avec l'ip %s n'est pas declaree !" % ip
continue
hostname = machine.nom()
proprio = machine.proprietaire()