Commit f6fa910e authored by Valentin Samir's avatar Valentin Samir

[munin/iptables_] On ne plante pas sur une chaine vide

parent 19d782c0
......@@ -51,7 +51,8 @@ else :
data = commands.getoutput("%s %s | uniq | awk '{print $4}' | grep 231 | awk -F '.' '{print $1$2$3}' | sort | uniq -c | grep 231" % (IPTABLES, chain)).split('\n')
total = 0
for line in data :
value, subnet = line.split()
try: value, subnet = line.split()
except ValueError: continue
total += int(value)
if subnet[:8] == "10231136":
print "%sadm.value %s" % (nom, value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment