Piccole imprecisioni (dimenticato uno strip())

Leonardo Robol [2010-04-17 08:36]
Piccole imprecisioni (dimenticato uno strip())
Filename
phcstats.py
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):
ViewGit