From c46013df0f2ae8a3534246ba45449c1cdacc58e6 Mon Sep 17 00:00:00 2001 From: VG Date: Mon, 9 May 2016 14:27:28 +0200 Subject: Auto-commit on 6d1dbe8495b5fafbc5f50d80268d0ca5b7b097be --- climl.py | 6 +++--- climl/imap.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 climl.py diff --git a/climl.py b/climl.py old mode 100644 new mode 100755 index 3afa3e6..e6d94c4 --- a/climl.py +++ b/climl.py @@ -1,5 +1,5 @@ +#!/home/calendros/work/climl/venv/bin/python3 #!/usr/bin/python3 -if __name__ == '__main__': - import climl - climl.main() +import climl +climl.main() diff --git a/climl/imap.py b/climl/imap.py index 208f9cc..bd5b3ff 100644 --- a/climl/imap.py +++ b/climl/imap.py @@ -64,7 +64,7 @@ def connect_to_imap(conf, password): def main(callback=None): assert callback - confpath = os.path.expanduser('~/temp/conf.cfg') + confpath = os.path.expanduser('~/.config/climl/climl.cfg') conf = conf_postprocess(confparser.read_conf(confpath)) print('Read conf:', conf) password_command = conf.get('imap.password_command', None) @@ -87,7 +87,8 @@ def main(callback=None): break print('result:', result) print('calling callback') - callback('mail') + if result: + callback('mail') print('end of connection') -- cgit v1.2.3