From f8cea760b661b6c995c73d6bee3e163d78d33353 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 4 Oct 2016 21:10:10 +0200 Subject: [PATCH] Fix the gmail_notify plugin --- slixmpp/plugins/gmail_notify.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/slixmpp/plugins/gmail_notify.py b/slixmpp/plugins/gmail_notify.py index 8071984c..f4cf188c 100644 --- a/slixmpp/plugins/gmail_notify.py +++ b/slixmpp/plugins/gmail_notify.py @@ -23,13 +23,13 @@ class GmailQuery(ElementBase): plugin_attrib = 'gmail' interfaces = set(('newer-than-time', 'newer-than-tid', 'q', 'search')) - def getSearch(self): + def get_search(self): return self['q'] - def setSearch(self, search): + def set_search(self, search): self['q'] = search - def delSearch(self): + def del_search(self): del self['q'] @@ -40,17 +40,17 @@ class MailBox(ElementBase): interfaces = set(('result-time', 'total-matched', 'total-estimate', 'url', 'threads', 'matched', 'estimate')) - def getThreads(self): + def get_threads(self): threads = [] for threadXML in self.xml.findall('{%s}%s' % (MailThread.namespace, MailThread.name)): threads.append(MailThread(xml=threadXML, parent=None)) return threads - def getMatched(self): + def get_matched(self): return self['total-matched'] - def getEstimate(self): + def get_estimate(self): return self['total-estimate'] == '1' @@ -62,7 +62,7 @@ class MailThread(ElementBase): 'senders', 'url', 'labels', 'subject', 'snippet')) sub_interfaces = set(('labels', 'subject', 'snippet')) - def getSenders(self): + def get_senders(self): senders = [] sendersXML = self.xml.find('{%s}senders' % self.namespace) if sendersXML is not None: @@ -77,10 +77,10 @@ class MailSender(ElementBase): plugin_attrib = 'sender' interfaces = set(('address', 'name', 'originator', 'unread')) - def getOriginator(self): + def get_originator(self): return self.xml.attrib.get('originator', '0') == '1' - def getUnread(self): + def get_unread(self): return self.xml.attrib.get('unread', '0') == '1'