]> git.dolda2000.com Git - pdm.git/blobdiff - pdm/perf.py
Handle subscribed callbacks unregistering themselves.
[pdm.git] / pdm / perf.py
index fd4daa63f07f3183c00bfda69fc83bd9ff4ebcc4..7aef95a40b15b9e1e313889a868ecbf3f6d9125e 100644 (file)
@@ -129,7 +129,7 @@ class eventobj(perfobj):
 
     def notify(self, event):
         """Notify all subscribers with the given event object."""
 
     def notify(self, event):
         """Notify all subscribers with the given event object."""
-        for cb in self.subscribers:
+        for cb in list(self.subscribers):
             try:
                 cb(event)
             except: pass
             try:
                 cb(event)
             except: pass