diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-08-30 11:03:02 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-30 11:03:02 -0700 |
commit | 6eb7ce2ca79adb5635f958f9c27d319c851212aa (patch) | |
tree | 9c7038670c7d0b9714a2c51294c19bf152c082b2 /alot | |
parent | 9bd32e5b0b253aa80c44e7d54f15e66ceb84a9e8 (diff) |
db/message: Use self._id instead of self.get_message_id()
The latter function returns self._id anyway, and this avoids a function
call when sorting.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/db/message.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alot/db/message.py b/alot/db/message.py index f8dcb74f..d07bd283 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -66,17 +66,17 @@ class Message(object): def __eq__(self, other): if isinstance(other, type(self)): - return self.get_message_id() == other.get_message_id() + return self._id == other.get_message_id() return NotImplemented def __ne__(self, other): if isinstance(other, type(self)): - return self.get_message_id() != other.get_message_id() + return self._id != other.get_message_id() return NotImplemented def __lt__(self, other): if isinstance(other, type(self)): - return self.get_message_id() < other.get_message_id() + return self._id < other.get_message_id() return NotImplemented def get_email(self): |