aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-05-09 14:27:28 +0200
committerVG <vg@devys.org>2016-05-09 14:27:28 +0200
commitc46013df0f2ae8a3534246ba45449c1cdacc58e6 (patch)
tree73762693c6fed5d9224778918cd004837ea2ffc3
parent5a4810462ce4ad100ce9a0b3220751b7c3f311b6 (diff)
downloadcliml-c46013df0f2ae8a3534246ba45449c1cdacc58e6.tar.gz
climl-c46013df0f2ae8a3534246ba45449c1cdacc58e6.tar.bz2
climl-c46013df0f2ae8a3534246ba45449c1cdacc58e6.zip
Auto-commit on 6d1dbe8495b5fafbc5f50d80268d0ca5b7b097be
-rwxr-xr-x[-rw-r--r--]climl.py6
-rw-r--r--climl/imap.py5
2 files changed, 6 insertions, 5 deletions
diff --git a/climl.py b/climl.py
index 3afa3e6..e6d94c4 100644..100755
--- 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')