Add method to remove a filter.

This commit is contained in:
Lance Stout 2012-07-10 01:37:23 -07:00
parent 8dcb441f44
commit 5df3839b7a

View file

@ -954,6 +954,10 @@ class XMLStream(object):
else:
self.__filters[mode].append(handler)
def del_filter(self, mode, handler):
"""Remove an incoming or outgoing filter."""
self.__filters[mode].remove(handler)
def add_handler(self, mask, pointer, name=None, disposable=False,
threaded=False, filter=False, instream=False):
"""A shortcut method for registering a handler using XML masks.