diff options
author | Lance Stout <lancestout@gmail.com> | 2011-02-14 16:26:23 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-02-14 16:26:23 -0500 |
commit | d5b3a5282763e4f74816ff392bd8cd47dd9f7a95 (patch) | |
tree | 10b421c0cf9cf47997162485f35dabdccfffab69 /sleekxmpp/xmlstream/handler | |
parent | 1a270dc05cc368000f3545975befa0589031b684 (diff) | |
parent | d709f8db657aa1d1314082d842dd29e2546739c4 (diff) | |
download | slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.gz slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.bz2 slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.xz slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.zip |
Merge branch 'develop' into stream_features
Conflicts:
sleekxmpp/xmlstream/stanzabase.py
Diffstat (limited to 'sleekxmpp/xmlstream/handler')
-rw-r--r-- | sleekxmpp/xmlstream/handler/base.py | 7 | ||||
-rw-r--r-- | sleekxmpp/xmlstream/handler/callback.py | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sleekxmpp/xmlstream/handler/base.py b/sleekxmpp/xmlstream/handler/base.py index 9c704ec6..6ec9b6a3 100644 --- a/sleekxmpp/xmlstream/handler/base.py +++ b/sleekxmpp/xmlstream/handler/base.py @@ -42,8 +42,6 @@ class BaseHandler(object): this handler. stream -- The XMLStream instance the handler should monitor. """ - self.checkDelete = self.check_delete - self.name = name self.stream = stream self._destroy = False @@ -87,3 +85,8 @@ class BaseHandler(object): handlers. """ return self._destroy + + +# To comply with PEP8, method names now use underscores. +# Deprecated method names are re-mapped for backwards compatibility. +BaseHandler.checkDelete = BaseHandler.check_delete diff --git a/sleekxmpp/xmlstream/handler/callback.py b/sleekxmpp/xmlstream/handler/callback.py index f0a72853..7fadab43 100644 --- a/sleekxmpp/xmlstream/handler/callback.py +++ b/sleekxmpp/xmlstream/handler/callback.py @@ -61,7 +61,8 @@ class Callback(BaseHandler): Arguments: payload -- The matched stanza object. """ - BaseHandler.prerun(self, payload) + if self._once: + self._destroy = True if self._instream: self.run(payload, True) @@ -78,7 +79,7 @@ class Callback(BaseHandler): Defaults to False. """ if not self._instream or instream: - BaseHandler.run(self, payload) self._pointer(payload) if self._once: self._destroy = True + del self._pointer |