From 4e96078e0953140722ffabcbbc7e0ab0ebe80c88 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Sun, 20 May 2018 22:24:38 +0200 Subject: [PATCH] offlineimap_notify: remove debug output --- offlineimap_notify.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) mode change 100644 => 100755 offlineimap_notify.py diff --git a/offlineimap_notify.py b/offlineimap_notify.py old mode 100644 new mode 100755 index 1556428..a48f1eb --- a/offlineimap_notify.py +++ b/offlineimap_notify.py @@ -20,11 +20,8 @@ for m in mailboxes.strip('\n').split(" "): def new_mail(event): with open(event.pathname, 'r') as f: mail = MaildirMessage(message=f) - print(mail) efrom = 'From: ' + mail['From'] - print(efrom) esubject = 'Subject: ' + mail['Subject'] - print(esubject) n = pynotify.Notification("New mail in " + '/'.join( event.path.split('/')[-3:-1]), efrom + "\n" + esubject) n.set_timeout(8000) @@ -38,4 +35,5 @@ for box in boxes: watch_manager.add_watch(join(maildir, box, 'new'), pyinotify.IN_CREATE | pyinotify.IN_MOVED_TO) +print('running new mail notifier in a loop...') file_notifier.loop()