summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-10 01:37:23 -0700
committerLance Stout <lancestout@gmail.com>2012-07-10 01:37:23 -0700
commit5df3839b7a8b1a3ca47f057865a52fe7a3f30229 (patch)
tree30bf203e0fd4af60ff12a5df6358c12fbd4f84c4 /sleekxmpp
parent8dcb441f440ea4c65b4f5d02ed682081f28af11c (diff)
downloadslixmpp-5df3839b7a8b1a3ca47f057865a52fe7a3f30229.tar.gz
slixmpp-5df3839b7a8b1a3ca47f057865a52fe7a3f30229.tar.bz2
slixmpp-5df3839b7a8b1a3ca47f057865a52fe7a3f30229.tar.xz
slixmpp-5df3839b7a8b1a3ca47f057865a52fe7a3f30229.zip
Add method to remove a filter.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py4
1 files changed, 4 insertions, 0 deletions
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.