From 03377202abddc27b79140e098a4c4ec967e7c412 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Tue, 9 Dec 2008 02:35:10 +0100 Subject: [PATCH] [wikis/.../Hoststatus.py] Un nom de machine peut contenir des . ou des - darcs-hash:20081209013510-bd074-4824a38aae3caeca3d32b06248c0e6d260f1266d.gz --- wiki-lenny/local/macro/HostStatus.py | 2 +- wiki/macro/HostStatus.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki-lenny/local/macro/HostStatus.py b/wiki-lenny/local/macro/HostStatus.py index 770c7ad5..e0bb5793 100644 --- a/wiki-lenny/local/macro/HostStatus.py +++ b/wiki-lenny/local/macro/HostStatus.py @@ -22,7 +22,7 @@ def execute(macro, text) : line = lines[0].split(' ') trucsdown += f.table_row(1) trucsdown += f.table_cell(1,{'style':'background-color:lightgrey;'}) - trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^a-zA-Z]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "iso-8859-15") + trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^-.a-zA-Z]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "iso-8859-15") trucsdown += f.table_cell(0) # nombre de non réponse au ping if int(line[1]) > 2 : diff --git a/wiki/macro/HostStatus.py b/wiki/macro/HostStatus.py index d5b743cf..6d504228 100644 --- a/wiki/macro/HostStatus.py +++ b/wiki/macro/HostStatus.py @@ -21,7 +21,7 @@ def execute(macro, text) : line = lines[0].split(' ') trucsdown += f.table_row(1) trucsdown += f.table_cell(1,{'style':'background-color:lightgrey;'}) - trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^a-zA-Z]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "iso-8859-15") + trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^-a-zA-Z.]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "iso-8859-15") trucsdown += f.table_cell(0) # nombre de non réponse au ping if int(line[1]) > 2 :