File: pypubsub-for-taskcoach.patch

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 482,632 kB
  • sloc: cpp: 2,127,216; python: 294,089; makefile: 51,946; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (25 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Avoid exception from pubsub if __onDead handler not set
 Patch taken from taskcoach 1.4.1.  Applying it to the wxPython sources
 means that taskcoach doesn't need a tight dependency on wxPython, and the
 patch may help other applications.
 .
 Unsure who actually came up with the patch.
Origin: http://sourceforge.net/p/taskcoach/code/HEAD/tree/tags/Release1_4_1/thirdparty/patches/pypubsub.diff
Bug-Debian: https://bugs.debian.org/762413
Forwarded: no
Last-Update: 2014-10-21

--- wxpython3.0-3.0.1.1+dfsg.orig/wxPython/wx/lib/pubsub/core/listenerbase.py
+++ wxpython3.0-3.0.1.1+dfsg/wxPython/wx/lib/pubsub/core/listenerbase.py
@@ -93,7 +93,10 @@ class ListenerBase:
     def __notifyOnDead(self, ref):
         """This gets called when listener weak ref has died. Propagate
         info to Topic)."""
-        notifyDeath = self.__onDead
+        try:
+            notifyDeath = self.__onDead
+        except AttributeError:
+            return
         self._unlinkFromTopic_()
         if notifyDeath is not None:
             notifyDeath(self)