aboutsummaryrefslogtreecommitdiffstats
path: root/python/gmail_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/gmail_helpers.py')
-rw-r--r--python/gmail_helpers.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/gmail_helpers.py b/python/gmail_helpers.py
index ff7c49bd..f916f614 100644
--- a/python/gmail_helpers.py
+++ b/python/gmail_helpers.py
@@ -145,17 +145,17 @@ class GmailMessage(EmailMessage):
except errors.HttpError as error:
print('An error occurred: %s' % error)
- @staticmethod
- def list_msg_ids(label, start_history_id=None):
+ @classmethod
+ def list_msg_ids(cls, label, start_history_id=None):
if start_history_id is not None:
- return ListHistory(GmailMessage._service,
+ return ListHistory(cls._service,
'me',
- label_id=GmailMessage._labels[label],
+ label_id=cls._labels[label],
start_history_id=start_history_id)
else:
- return ListMessagesWithLabels(GmailMessage._service,
+ return ListMessagesWithLabels(cls._service,
'me',
- label_ids=[GmailMessage._labels[label]])
+ label_ids=[cls._labels[label]])
@classmethod
def from_id(cls, msg_id, user_id='me'):