[gestion] punicode les services
darcs-hash:20090614133916-bd074-c6baf94b697e4cd3d61a8c16ef98e01a330d75ec.gz
This commit is contained in:
parent
e85b70c5ed
commit
1e3c4fa10c
2 changed files with 11 additions and 8 deletions
|
@ -2264,7 +2264,7 @@ Subject: Bugreport %s
|
||||||
if debug:
|
if debug:
|
||||||
print u"Les services suivants seront redémarrés: "
|
print u"Les services suivants seront redémarrés: "
|
||||||
for s in serv:
|
for s in serv:
|
||||||
print '\t%s' % s
|
print u'\t%s' % s
|
||||||
|
|
||||||
if debug: print '-*- Fin -*-'
|
if debug: print '-*- Fin -*-'
|
||||||
|
|
||||||
|
|
|
@ -242,18 +242,21 @@ class Service:
|
||||||
self.args = args
|
self.args = args
|
||||||
self.start = map(int, start)
|
self.start = map(int, start)
|
||||||
|
|
||||||
def __str__(self):
|
def __unicode__(self):
|
||||||
starting = self.start
|
starting = self.start
|
||||||
starting.sort()
|
starting.sort()
|
||||||
dates = ' et '.join(map(lambda t: t < time.time() and \
|
dates = u' et '.join(map(lambda t: t < time.time() and \
|
||||||
"maintenant" or time.strftime(date_format,
|
u"maintenant" or time.strftime(date_format,
|
||||||
time.localtime(t)),
|
time.localtime(t)),
|
||||||
self.start))
|
self.start))
|
||||||
dates = " à partir d%s %s" % (dates.startswith("maintenant") and "e" or "u",
|
dates = u" à partir d%s %s" % (dates.startswith(u"maintenant") and u"e" or u"u",
|
||||||
dates)
|
dates)
|
||||||
return ("%s(%s)%s" % (self.nom,
|
return (u"%s(%s)%s" % (self.nom,
|
||||||
','.join(self.args),
|
u','.join(self.args),
|
||||||
dates)).replace(" et maintenant", "")
|
dates)).replace(u" et maintenant", u"")
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.__unicode__().encode("ascii", "ignore")
|
||||||
|
|
||||||
class CransLdap:
|
class CransLdap:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue