ppf/new: Use self.handlers instead of handlers in SwarmWriter class
authorMariana Mărășoiu <mariana.marasoiu@gmail.com>
Sun, 28 Aug 2011 17:27:34 +0000 (20:27 +0300)
committerMariana Mărășoiu <mariana.marasoiu@gmail.com>
Sun, 28 Aug 2011 17:41:28 +0000 (20:41 +0300)
ppf/new/storage.py

index d75aec8..68fd348 100644 (file)
@@ -706,30 +706,30 @@ class SwarmWriter(object):
     """
 
     def __init__(self):
-        handlers = []
+        self.handlers = []
 
     def add_access_handle(self, handle):
-        handlers.append(handle)
+        self.handlers.append(handle)
 
     def remove_access_handle(self, handle):
-        handlers.remove(handle)
+        self.handlers.remove(handle)
 
     def add_swarm(self, swarm):
-        for h in handlers:
+        for h in self.handlers:
             h.add_swarm(swarm)
 
     def add_client_session(self, session):
-        for h in handlers:
-            h.add_client_session(swarm)
+        for h in self.handlers:
+            h.add_client_session(session)
 
     def add_peer_status_message(self, msg):
-        for h in handlers:
-            h.add_peer_status_message(swarm)
+        for h in self.handlers:
+            h.add_peer_status_message(msg)
 
     def add_status_message(self, msg):
-        for h in handlers:
-            h.add_status_message(swarm)
+        for h in self.handlers:
+            h.add_status_message(msg)
 
     def add_verbose_message(self, msg):
-        for h in handlers:
-            h.add_verbose_message(swarm)
+        for h in self.handlers:
+            h.add_verbose_message(msg)