fix getting accused status for messages

This commit is contained in:
Romain Bignon 2010-09-30 20:12:40 +02:00
commit 776f5d3ac8

View file

@ -135,7 +135,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
profiles[mail.profile_link] = self.browser.get_profile(mail.profile_link) profiles[mail.profile_link] = self.browser.get_profile(mail.profile_link)
mail.signature += u'\n%s' % profiles[mail.profile_link].get_profile_text() mail.signature += u'\n%s' % profiles[mail.profile_link].get_profile_text()
if mail.sender != my_name: if mail.sender == my_name:
if mail.new: if mail.new:
flags |= Message.IS_NOT_ACCUSED flags |= Message.IS_NOT_ACCUSED
else: else:
@ -235,7 +235,6 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
self.browser.post_mail(message.thread.id, message.content) self.browser.post_mail(message.thread.id, message.content)
def get_contact(self, contact): def get_contact(self, contact):
try:
with self.browser: with self.browser:
if isinstance(contact, Contact): if isinstance(contact, Contact):
_id = contact.id _id = contact.id
@ -276,8 +275,6 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
contact.profile.append(s) contact.profile.append(s)
return contact return contact
except BrowserUnavailable:
return None
def init_optimizations(self): def init_optimizations(self):
self.OPTIM_PROFILE_WALKER = ProfilesWalker(self.weboob.scheduler, self.storage, self.browser) self.OPTIM_PROFILE_WALKER = ProfilesWalker(self.weboob.scheduler, self.storage, self.browser)