From 8fba0b69a3a75153917ffd4c424a5ed3fc991b05 Mon Sep 17 00:00:00 2001 From: enkore Date: Sat, 23 Feb 2013 23:00:28 +0100 Subject: [PATCH] Fixed thunderbird (deeeeeep recursion) --- i3pystatus/mail/thunderbird.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i3pystatus/mail/thunderbird.py b/i3pystatus/mail/thunderbird.py index fd0a381..31f2555 100644 --- a/i3pystatus/mail/thunderbird.py +++ b/i3pystatus/mail/thunderbird.py @@ -27,7 +27,7 @@ class Thunderbird(Backend): * python-gobject2 """ - unread = set() + _unread = set() def init(self): dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) @@ -45,14 +45,14 @@ class Thunderbird(Backend): self.run = partial(self.context.iteration, False) def new_msg(self, id, author, subject): - if id not in self.unread: - self.unread.add(id) + if id not in self._unread: + self._unread.add(id) def changed_msg(self, id, event): - if event == "read" and id in self.unread: - self.unread.remove(id) + if event == "read" and id in self._unread: + self._unread.remove(id) @property def unread(self): self.run() - return len(self.unread) + return len(self._unread)