aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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')