diff --git a/weboob/backends/dlfp/backend.py b/weboob/backends/dlfp/backend.py index f39223bb3ca0d53986d4c2c50b014b475e599684..eb3b84a730cd816bfa451062c468808391cc1ad4 100644 --- a/weboob/backends/dlfp/backend.py +++ b/weboob/backends/dlfp/backend.py @@ -34,5 +34,5 @@ def __init__(self, weboob): def iter_messages(self): articles_list = ArticlesList('newspaper') for article in articles_list.iter_articles(): - yield Message('threadid', article._id, article.title, article.author, signature='Bite bite bite bite', + yield Message('threadid', article.id, article.title, article.author, signature='Bite bite bite bite', content='Content content\nContent content.') diff --git a/weboob/capabilities/messages.py b/weboob/capabilities/messages.py index f48f06cb54716b6b792c677f7a58bd0342246e98..e4b7bb7076c26c179ea83eb3b5208a9c3581430e 100644 --- a/weboob/capabilities/messages.py +++ b/weboob/capabilities/messages.py @@ -24,7 +24,7 @@ class Message: def __init__(self, thread_id, _id, title, sender, date=None, reply_id=u'', content=u'', signature=u''): self.thread_id = unicode(thread_id) - self._id = unicode(_id) + self.id = unicode(_id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender) @@ -40,13 +40,13 @@ def get_date_int(self): return int(time.strftime('%Y%m%d%H%M%S', self.get_date().timetuple())) def get_full_id(self): - return '%s.%s' % (self._id, self.thread_id) + return '%s.%s' % (self.id, self.thread_id) def get_full_reply_id(self): return '%s.%s' % (self.reply_id, self.thread_id) def get_id(self): - return self._id + return self.id def get_thread_id(self): return self.thread_id @@ -72,9 +72,9 @@ def get_signature(self): def is_new(self): return self.new - def __str__(self): - result = '' % ( - self.title, self.date, self.sender, self.content) + def __repr__(self): + result = '' % ( + self.id, self.title, self.date, self.sender) return result.encode('utf-8') class ICapMessages: diff --git a/weboob/frontends/mail/scripts/mail b/weboob/frontends/mail/scripts/mail index c71588a45c1e8eb907172a792ba5a327bd83b1e9..330a2342b2519b330adfd6dd20dff6cc7559feef 100755 --- a/weboob/frontends/mail/scripts/mail +++ b/weboob/frontends/mail/scripts/mail @@ -47,7 +47,6 @@ class Application(BaseApplication): self.weboob.load_modules(ICapMessages) self.weboob.schedule(self.config['interval'], self.process) - self.weboob.config.save() self.weboob.loop() def process(self): diff --git a/weboob/frontends/travel/application.py b/weboob/frontends/travel/application.py index da5124d4180c9e6173bc1302d365a53a1d12d95b..ffbc75f804bce397ce41ffcc254c5235eb50b972 100644 --- a/weboob/frontends/travel/application.py +++ b/weboob/frontends/travel/application.py @@ -32,11 +32,6 @@ class Application(BaseApplication): CONFIG = {} def main(self, argv): - #if not self.config: - # print >>sys.stderr, "Error: %s is not configured yet. Please call 'weboob.travel -c'" % argv[0] - # print >>sys.stderr, "Also, you need to use 'weboobcfg' to set backend configs" - # return -1 - self.weboob.load_modules(ICapTravel) if len(argv) == 1: