# from leoPlugins.py file
def registerOneHandler(self, tag, fn):
"""Register one handler"""
try:
moduleName = self.loadingModuleNameStack[-1]
except IndexError:
moduleName = '<no module>'
...
items = self.handlers.get(tag, [])
if fn not in items:
bunch = g.Bunch(fn=fn, moduleName=moduleName, tag='handler')
items.append(bunch)
self.handlers[tag] = items
It looks like the above code checks to see if given function has already
been registered, (`if fn not in items:`) but then it puts a bunch instance
in items not the handler function. Unless I am mistaken, it will never be
the case that the above condition is False, because handler function will
never be added to items array.
Vitalije
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.