diff options
author | Lance Stout <lancestout@gmail.com> | 2013-02-10 11:47:47 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2013-02-10 11:47:47 -0800 |
commit | 774bf35fabf26b7baf9e03af3e44188cc92fb6f4 (patch) | |
tree | 2756402c7b4c768b30e30e53f9d4ffac0128bd57 /sleekxmpp | |
parent | 1a2db7fb113cfa726b1ec0d64e458d017139eb0c (diff) | |
download | slixmpp-774bf35fabf26b7baf9e03af3e44188cc92fb6f4.tar.gz slixmpp-774bf35fabf26b7baf9e03af3e44188cc92fb6f4.tar.bz2 slixmpp-774bf35fabf26b7baf9e03af3e44188cc92fb6f4.tar.xz slixmpp-774bf35fabf26b7baf9e03af3e44188cc92fb6f4.zip |
Tidy up a bit
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/google/gmail/notifications.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/google/gmail/notifications.py b/sleekxmpp/plugins/google/gmail/notifications.py index 7226fa1f..e1f9cf38 100644 --- a/sleekxmpp/plugins/google/gmail/notifications.py +++ b/sleekxmpp/plugins/google/gmail/notifications.py @@ -52,7 +52,7 @@ class Gmail(BasePlugin): self.xmpp.remove_handler('Gmail New Mail') def _handle_new_mail(self, iq): - log.info("Gmail: New email!") + log.info('Gmail: New email!') iq.reply().send() self.xmpp.event('gmail_notification') @@ -61,10 +61,10 @@ class Gmail(BasePlugin): last_tid = self._last_result_tid def check_callback(data): - self._last_result_time = data["gmail_messages"]["result_time"] - if data["gmail_messages"]["threads"]: - self._last_result_tid = \ - data["gmail_messages"]["threads"][0]["tid"] + self._last_result_time = data['gmail_messages']['result_time'] + threads = data['gmail_messages']['threads'] + if threads: + self._last_result_tid = threads[0]['tid'] if callback: callback(data) |