From 25a68cd4dc535f18db11ace2df4cbba85c9066bb Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Wed, 18 Jul 2012 16:46:34 +0200 Subject: [PATCH] [ldap_crans, deconnexion] print u"" == stupide Ignore-this: a20c00ec570810fc4a73c73dabdc5a42 darcs-hash:20120718144634-ffbb2-a463a1a7705e2a81a9a88710a8fcaf97ffac871d.gz --- gestion/ldap_crans.py | 14 +++++++------- surveillance/deconnexion.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 85bd58aa..f647ae15 100644 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -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 diff --git a/surveillance/deconnexion.py b/surveillance/deconnexion.py index d165527b..659ed80a 100644 --- a/surveillance/deconnexion.py +++ b/surveillance/deconnexion.py @@ -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()