Commit f5a8c1c1 authored by Romain Bignon's avatar Romain Bignon

fix code for the new INIConfig parser

parent cd8d0b63
......@@ -39,7 +39,7 @@ class Monboob(ConsoleApplication):
'domain': 'weboob.example.org',
'recipient': 'weboob@example.org',
'smtp': 'localhost',
'html': False}
'html': 0}
def main(self, argv):
self.load_config()
......@@ -92,7 +92,7 @@ class Monboob(ConsoleApplication):
@ConsoleApplication.command("run daemon")
def command_run(self):
self.weboob.repeat(self.config.get('interval'), self.process)
self.weboob.repeat(int(self.config.get('interval')), self.process)
self.weboob.loop()
def process(self):
......@@ -114,7 +114,7 @@ class Monboob(ConsoleApplication):
date = time.strftime('%a, %d %b %Y %H:%M:%S +0000', mail.get_date().timetuple())
msg_id = u'<%s.%s@%s>' % (backend.name, mail.get_full_id(), domain)
if self.config.get('html') and mail.is_html:
if int(self.config.get('html')) and mail.is_html:
body = mail.get_content()
content_type = 'html'
else:
......@@ -125,7 +125,7 @@ class Monboob(ConsoleApplication):
content_type = 'plain'
if mail.get_signature():
if self.config.get('html') and mail.is_html:
if (self.config.get('html')) and mail.is_html:
body += u'<p>-- <br />%s</p>' % mail.get_signature()
else:
body += u'\n\n-- \n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment