From 51c86362e0f20b1cb660b612f61f5f4e67b3cbd5 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 2 Nov 2014 03:10:10 +0100 Subject: [PATCH] Handle subscribed callbacks unregistering themselves. --- pdm/perf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdm/perf.py b/pdm/perf.py index fd4daa6..7aef95a 100644 --- a/pdm/perf.py +++ b/pdm/perf.py @@ -129,7 +129,7 @@ class eventobj(perfobj): 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 -- 2.11.0