fix code for the new INIConfig parser
This commit is contained in:
parent
cd8d0b638a
commit
f5a8c1c1a8
1 changed files with 4 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ class Monboob(ConsoleApplication):
|
||||||
'domain': 'weboob.example.org',
|
'domain': 'weboob.example.org',
|
||||||
'recipient': 'weboob@example.org',
|
'recipient': 'weboob@example.org',
|
||||||
'smtp': 'localhost',
|
'smtp': 'localhost',
|
||||||
'html': False}
|
'html': 0}
|
||||||
|
|
||||||
def main(self, argv):
|
def main(self, argv):
|
||||||
self.load_config()
|
self.load_config()
|
||||||
|
|
@ -92,7 +92,7 @@ class Monboob(ConsoleApplication):
|
||||||
|
|
||||||
@ConsoleApplication.command("run daemon")
|
@ConsoleApplication.command("run daemon")
|
||||||
def command_run(self):
|
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()
|
self.weboob.loop()
|
||||||
|
|
||||||
def process(self):
|
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())
|
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)
|
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()
|
body = mail.get_content()
|
||||||
content_type = 'html'
|
content_type = 'html'
|
||||||
else:
|
else:
|
||||||
|
|
@ -125,7 +125,7 @@ class Monboob(ConsoleApplication):
|
||||||
content_type = 'plain'
|
content_type = 'plain'
|
||||||
|
|
||||||
if mail.get_signature():
|
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()
|
body += u'<p>-- <br />%s</p>' % mail.get_signature()
|
||||||
else:
|
else:
|
||||||
body += u'\n\n-- \n'
|
body += u'\n\n-- \n'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue