From 9f3b493a712ccc8df6b072a43592d5c5a18a145a Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 8 May 2011 14:20:38 +0200 Subject: [PATCH] do not crash if the thread is not found --- weboob/applications/boobmsg/boobmsg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weboob/applications/boobmsg/boobmsg.py b/weboob/applications/boobmsg/boobmsg.py index 9c760649..fae7038e 100644 --- a/weboob/applications/boobmsg/boobmsg.py +++ b/weboob/applications/boobmsg/boobmsg.py @@ -299,6 +299,8 @@ class Boobmsg(ReplApplication): self.formatter._list_messages = False for backend, thread in cmd: + if not thread: + continue if len(arg) > 0: for m in thread.iter_all_messages(): if not m.backend: @@ -318,7 +320,9 @@ class Boobmsg(ReplApplication): cmd = self.do('iter_threads') for backend, thread in cmd: - t = backend.get_thread(thread.id) + if not thread: + continue + t = backend.fillobj(thread, None) for msg in t.iter_all_messages(): self.format(msg)