From 774bf35fabf26b7baf9e03af3e44188cc92fb6f4 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 10 Feb 2013 11:47:47 -0800 Subject: Tidy up a bit --- sleekxmpp/plugins/google/gmail/notifications.py | 10 +++++----- 1 file 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) -- cgit v1.2.3