diff options
author | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-09-02 20:01:28 +0000 |
---|---|---|
committer | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-09-02 20:01:28 +0000 |
commit | d576e32f7aa28332848cdd6e39893266eded64fd (patch) | |
tree | e36a1b85dc0692b6be223f2259c3c2df9cdb5e53 /sleekxmpp/xmlstream/matcher/id.py | |
parent | 6dfea828be54d9048779d06b4b31be98b58a2343 (diff) | |
parent | 4a2e7c5393da945359edc2648a2ec124481acf7d (diff) | |
download | slixmpp-d576e32f7aa28332848cdd6e39893266eded64fd.tar.gz slixmpp-d576e32f7aa28332848cdd6e39893266eded64fd.tar.bz2 slixmpp-d576e32f7aa28332848cdd6e39893266eded64fd.tar.xz slixmpp-d576e32f7aa28332848cdd6e39893266eded64fd.zip |
Merge branch 'develop' of git@github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp/xmlstream/matcher/id.py')
-rw-r--r-- | sleekxmpp/xmlstream/matcher/id.py | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sleekxmpp/xmlstream/matcher/id.py b/sleekxmpp/xmlstream/matcher/id.py index 43972c23..0c8ce2d8 100644 --- a/sleekxmpp/xmlstream/matcher/id.py +++ b/sleekxmpp/xmlstream/matcher/id.py @@ -5,9 +5,28 @@ See the file LICENSE for copying permission. """ -from . import base -class MatcherId(base.MatcherBase): - - def match(self, xml): - return xml['id'] == self._criteria +from sleekxmpp.xmlstream.matcher.base import MatcherBase + + +class MatcherId(MatcherBase): + + """ + The ID matcher selects stanzas that have the same stanza 'id' + interface value as the desired ID. + + Methods: + match -- Overrides MatcherBase.match. + """ + + def match(self, xml): + """ + Compare the given stanza's 'id' attribute to the stored + id value. + + Overrides MatcherBase.match. + + Arguments: + xml -- The stanza to compare against. + """ + return xml['id'] == self._criteria |