Ticket #13734: simplified_remove.diff

File simplified_remove.diff, 754 bytes (added by Satoru Logic, 14 years ago)
  • dispatcher.py

     
    226226        """
    227227        Remove dead receivers from connections.
    228228        """
    229 
    230         to_remove = []
    231         for key, connected_receiver in self.receivers:
     229        for idx in xrange(len(self.receivers)-1, -1, -1):
     230            (_, connected_receiver) = self.receivers[idx]
    232231            if connected_receiver == receiver:
    233                 to_remove.append(key)
    234         for key in to_remove:
    235             for idx, (r_key, _) in enumerate(self.receivers):
    236                 if r_key == key:
    237                     del self.receivers[idx]
     232                del self.receivers[idx]
Back to Top