[parse_auth_log] lisibilité++
Ignore-this: e36e7d6d0500f1281d02de548600ad49 darcs-hash:20090518055925-bd074-d544b98ac60570b92b71529cf355030637dc3a56.gz
This commit is contained in:
parent
0ba8023ff1
commit
cc94565b49
1 changed files with 6 additions and 3 deletions
|
@ -228,12 +228,15 @@ def affiche_erreurs(errs, message, min_mac=1, min_prise=1):
|
||||||
|
|
||||||
for mac, erreur_mac in erreur_prise['macs'].items():
|
for mac, erreur_mac in erreur_prise['macs'].items():
|
||||||
if erreur_mac['nombre'] >= min_mac:
|
if erreur_mac['nombre'] >= min_mac:
|
||||||
print ' %s (x%d)' % (erreur_mac['lignes'][-1].strip(),
|
ligne = erreur_mac['lignes'][-1].strip().split()
|
||||||
erreur_mac['nombre'])
|
ligne[5] = '%8s' % ligne[5].replace("adm.crans.org-", "")
|
||||||
|
ligne = ligne[0:3] + ligne[5:]
|
||||||
|
print ' %s (x%d)' % (' '.join(ligne), erreur_mac['nombre'])
|
||||||
info = erreur_mac['info']
|
info = erreur_mac['info']
|
||||||
if info != None:
|
if info != None:
|
||||||
prop = info['prop']
|
prop = info['prop']
|
||||||
cprint(u' -> propriétaire de la machine: %s <%s>, prise %s (chambre %s)' % (prop.Nom(), prop.email(), info['prise'], info['chambre']))
|
cprint(u' -> machine de : %-16s %5s (prise %s) <%s>' %
|
||||||
|
(prop.Nom()[:16], info['chambre'], info['prise'], prop.email()))
|
||||||
|
|
||||||
|
|
||||||
def __usage(err=''):
|
def __usage(err=''):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue