settings changed\n documentation added
This commit is contained in:
parent
e642a2d687
commit
ddd4e76bb8
@ -492,8 +492,17 @@ Checks for local mail in mbox
|
||||
Settings:
|
||||
|
||||
|
||||
maildir.MaildirMail
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Checks for new mail in a Maildir folder
|
||||
|
||||
|
||||
Settings:
|
||||
|
||||
:directory: (required, e.g. '/home/foo/mail/INBOX')
|
||||
|
||||
|
||||
notmuchmail.Notmuch
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -11,15 +11,15 @@ class MaildirMail(Backend):
|
||||
"""
|
||||
|
||||
settings = (
|
||||
"mailbox",
|
||||
"directory",
|
||||
)
|
||||
required = ("mailbox",)
|
||||
required = ("directory",)
|
||||
|
||||
mailbox=""
|
||||
directory=""
|
||||
|
||||
@property
|
||||
def unread(self):
|
||||
p = subprocess.Popen(['ls','-l',self.mailbox+'/new'], stdout=subprocess.PIPE)
|
||||
p = subprocess.Popen(['ls','-l',self.directory+'/new'], stdout=subprocess.PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
stdout=stdout.decode('utf8')
|
||||
return len(stdout.split('\n'))-2
|
||||
|
Loading…
Reference in New Issue
Block a user