aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-05-20 00:31:02 +0200
committerVG <vg@devys.org>2016-05-20 00:31:02 +0200
commitf9367c4da5e48ab597262093ca34536e2198a343 (patch)
treee57ad86a516044a9d97edfc57c0e0bec459a3089
parent41f2eac415ddaf3b93565225317f0579e9ae8cc4 (diff)
downloadcliml-f9367c4da5e48ab597262093ca34536e2198a343.tar.gz
climl-f9367c4da5e48ab597262093ca34536e2198a343.tar.bz2
climl-f9367c4da5e48ab597262093ca34536e2198a343.zip
Add more explicit prints for mail processing steps
-rw-r--r--climl/__init__.py1
-rw-r--r--climl/imap.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/climl/__init__.py b/climl/__init__.py
index bc8ca94..cb1f129 100644
--- a/climl/__init__.py
+++ b/climl/__init__.py
@@ -1,5 +1,6 @@
from . import imap
from . import interface
+from . import hooks
def on_email(content):
print('on_email:', content)
diff --git a/climl/imap.py b/climl/imap.py
index a0a3871..f15ae05 100644
--- a/climl/imap.py
+++ b/climl/imap.py
@@ -137,9 +137,10 @@ def process_emails(connection, callback=None, maxsize=None):
print('calling callback...')
try:
callback('mail: ' + str(oneid) + ': ' + str(data))
+ print('mark mail {}'.format(oneid))
connection.add_flags([oneid], ['\Answered'])
except interface.HookAbortError:
- pass
+ print('callback wanted to skip marking of mail {}'.format(oneid))
data = None