From 7265682a4d57d88956cb54f98f7a470465bbf417 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- sleekxmpp/plugins/google/auth/stanza.py | 2 +- sleekxmpp/plugins/google/nosave/stanza.py | 2 +- sleekxmpp/plugins/google/settings/settings.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sleekxmpp/plugins/google') diff --git a/sleekxmpp/plugins/google/auth/stanza.py b/sleekxmpp/plugins/google/auth/stanza.py index 49c5cba7..2d13f85a 100644 --- a/sleekxmpp/plugins/google/auth/stanza.py +++ b/sleekxmpp/plugins/google/auth/stanza.py @@ -24,7 +24,7 @@ class GoogleAuth(ElementBase): print('setting up google extension') def get_client_uses_full_bind_result(self): - return self.parent()._get_attr(self.disovery_attr) == 'true' + return self.parent()._get_attr(self.discovery_attr) == 'true' def set_client_uses_full_bind_result(self, value): print('>>>', value) diff --git a/sleekxmpp/plugins/google/nosave/stanza.py b/sleekxmpp/plugins/google/nosave/stanza.py index d8701322..791d4b0c 100644 --- a/sleekxmpp/plugins/google/nosave/stanza.py +++ b/sleekxmpp/plugins/google/nosave/stanza.py @@ -52,7 +52,7 @@ class Item(ElementBase): def get_source(self): return JID(self._get_attr('source', '')) - def set_source(self): + def set_source(self, value): self._set_attr('source', str(value)) diff --git a/sleekxmpp/plugins/google/settings/settings.py b/sleekxmpp/plugins/google/settings/settings.py index 7122ff56..591956fc 100644 --- a/sleekxmpp/plugins/google/settings/settings.py +++ b/sleekxmpp/plugins/google/settings/settings.py @@ -6,8 +6,6 @@ See the file LICENSE for copying permission. """ -import logging - from sleekxmpp.stanza import Iq from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import StanzaPath -- cgit v1.2.3 From 3dd379cdf12d885e26f8ec26c54879a95d5f0b84 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 15:15:14 +0200 Subject: Revert "cleanup semicolons, whitespace and mutable default arguments" This reverts commit 7265682a4d57d88956cb54f98f7a470465bbf417. --- sleekxmpp/plugins/google/auth/stanza.py | 2 +- sleekxmpp/plugins/google/nosave/stanza.py | 2 +- sleekxmpp/plugins/google/settings/settings.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/plugins/google') diff --git a/sleekxmpp/plugins/google/auth/stanza.py b/sleekxmpp/plugins/google/auth/stanza.py index 2d13f85a..49c5cba7 100644 --- a/sleekxmpp/plugins/google/auth/stanza.py +++ b/sleekxmpp/plugins/google/auth/stanza.py @@ -24,7 +24,7 @@ class GoogleAuth(ElementBase): print('setting up google extension') def get_client_uses_full_bind_result(self): - return self.parent()._get_attr(self.discovery_attr) == 'true' + return self.parent()._get_attr(self.disovery_attr) == 'true' def set_client_uses_full_bind_result(self, value): print('>>>', value) diff --git a/sleekxmpp/plugins/google/nosave/stanza.py b/sleekxmpp/plugins/google/nosave/stanza.py index 791d4b0c..d8701322 100644 --- a/sleekxmpp/plugins/google/nosave/stanza.py +++ b/sleekxmpp/plugins/google/nosave/stanza.py @@ -52,7 +52,7 @@ class Item(ElementBase): def get_source(self): return JID(self._get_attr('source', '')) - def set_source(self, value): + def set_source(self): self._set_attr('source', str(value)) diff --git a/sleekxmpp/plugins/google/settings/settings.py b/sleekxmpp/plugins/google/settings/settings.py index 591956fc..7122ff56 100644 --- a/sleekxmpp/plugins/google/settings/settings.py +++ b/sleekxmpp/plugins/google/settings/settings.py @@ -6,6 +6,8 @@ See the file LICENSE for copying permission. """ +import logging + from sleekxmpp.stanza import Iq from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import StanzaPath -- cgit v1.2.3 From afc939708ff71e168f9204f1eab8823b7dc9f875 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- sleekxmpp/plugins/google/auth/stanza.py | 2 +- sleekxmpp/plugins/google/nosave/stanza.py | 2 +- sleekxmpp/plugins/google/settings/settings.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sleekxmpp/plugins/google') diff --git a/sleekxmpp/plugins/google/auth/stanza.py b/sleekxmpp/plugins/google/auth/stanza.py index 49c5cba7..2d13f85a 100644 --- a/sleekxmpp/plugins/google/auth/stanza.py +++ b/sleekxmpp/plugins/google/auth/stanza.py @@ -24,7 +24,7 @@ class GoogleAuth(ElementBase): print('setting up google extension') def get_client_uses_full_bind_result(self): - return self.parent()._get_attr(self.disovery_attr) == 'true' + return self.parent()._get_attr(self.discovery_attr) == 'true' def set_client_uses_full_bind_result(self, value): print('>>>', value) diff --git a/sleekxmpp/plugins/google/nosave/stanza.py b/sleekxmpp/plugins/google/nosave/stanza.py index d8701322..791d4b0c 100644 --- a/sleekxmpp/plugins/google/nosave/stanza.py +++ b/sleekxmpp/plugins/google/nosave/stanza.py @@ -52,7 +52,7 @@ class Item(ElementBase): def get_source(self): return JID(self._get_attr('source', '')) - def set_source(self): + def set_source(self, value): self._set_attr('source', str(value)) diff --git a/sleekxmpp/plugins/google/settings/settings.py b/sleekxmpp/plugins/google/settings/settings.py index 7122ff56..591956fc 100644 --- a/sleekxmpp/plugins/google/settings/settings.py +++ b/sleekxmpp/plugins/google/settings/settings.py @@ -6,8 +6,6 @@ See the file LICENSE for copying permission. """ -import logging - from sleekxmpp.stanza import Iq from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import StanzaPath -- cgit v1.2.3 From e328ff483334794bfd1b6a42a2e1e8e3e2814eb5 Mon Sep 17 00:00:00 2001 From: s-m-b Date: Sun, 9 Nov 2014 04:36:38 +0300 Subject: Typo fix of parameter name 'data' it is now 'iq' Code was broken during refactoring --- sleekxmpp/plugins/google/gmail/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/plugins/google') diff --git a/sleekxmpp/plugins/google/gmail/notifications.py b/sleekxmpp/plugins/google/gmail/notifications.py index 509a95fd..e65b2ca7 100644 --- a/sleekxmpp/plugins/google/gmail/notifications.py +++ b/sleekxmpp/plugins/google/gmail/notifications.py @@ -74,8 +74,8 @@ class Gmail(BasePlugin): return resp def _update_last_results(self, iq, callback=None): - self._last_result_time = data['gmail_messages']['result_time'] - threads = data['gmail_messages']['threads'] + self._last_result_time = iq['gmail_messages']['result_time'] + threads = iq['gmail_messages']['threads'] if threads: self._last_result_tid = threads[0]['tid'] if callback: -- cgit v1.2.3