From 7f085f0cf938a987e70e01c9dee9b918cc4da283 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Sat, 17 Apr 2010 10:36:16 +0200 Subject: [PATCH] Piccole imprecisioni (dimenticato uno strip()) --- phcstats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phcstats.py b/phcstats.py index 3c198d3..ade42f6 100755 --- a/phcstats.py +++ b/phcstats.py @@ -17,7 +17,8 @@ def LoadClients(group = 'all'): """ clients = [] for client in open('/etc/dsh/group/' + group, 'r'): - if client.strip() != '' and client.strip()[0] != '#': + client = client.strip() + if client.strip != '' and client[0] != '#': clients.append (client) return clients @@ -54,7 +55,7 @@ def DumpClientData(client, data): data.items())) f = open(database_directory + client, 'w') for stat in data.items(): - f.write (":".join(map(str, stat)) + f.write (":".join(map(str, stat))) f.close() def UpdateClientsData(client, alive): -- 2.1.4