From 5df3839b7a8b1a3ca47f057865a52fe7a3f30229 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 10 Jul 2012 01:37:23 -0700 Subject: Add method to remove a filter. --- sleekxmpp/xmlstream/xmlstream.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 3baa5b80..49f33933 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -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. -- cgit v1.2.3