From 991e7e99a92f0f565afb0bb4457780691f1738a1 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sat, 17 Apr 2010 10:32:19 +0200 Subject: [PATCH] Piccole dimenticanze --- phcstats.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phcstats.py b/phcstats.py index 4793897..33904e7 100755 --- a/phcstats.py +++ b/phcstats.py @@ -4,7 +4,7 @@ # Monitora se i computer dell'aula studenti sono accesi # e restituisce delle statistiche a proposito. -import subprocess +import subprocess, time # Qualche variabile globale database_directory = '/home/robol/client_stats/' # Il traling slash ci serve @@ -16,8 +16,9 @@ def LoadClients(group = 'all'): gruppo group di dsh. Il default รจ 'all' """ clients = [] - for client in open('/etc/dsh/groups/' + group, 'r'): - clients.append (client) + for client in open('/etc/dsh/group/' + group, 'r'): + if client.strip() != '' and client.strip()[0] != '#': + clients.append (client) return clients def IsAlive(client): -- 2.1.4