diff --git a/i3pystatus/mail/notmuchmail.py b/i3pystatus/mail/notmuchmail.py index 00e99c0..3919d45 100644 --- a/i3pystatus/mail/notmuchmail.py +++ b/i3pystatus/mail/notmuchmail.py @@ -35,11 +35,10 @@ class Notmuch(Backend): self.db_path = config.get("database", "path") - self.db = notmuch.Database(self.db_path) - @property def unread(self): - return notmuch.Query(self.db, "tag:unread and tag:inbox").count_messages() + db = notmuch.Database(self.db_path) + return notmuch.Query(db, "tag:unread and tag:inbox").count_messages() Backend = Notmuch