use iterator instead of get_backends

This commit is contained in:
Christophe Benz 2010-03-11 15:29:30 +01:00 committed by Christophe Benz
commit a4dd17631f
2 changed files with 7 additions and 11 deletions

View file

@ -57,9 +57,8 @@ class Application(BaseApplication):
self.weboob.loop()
def process(self):
backends = self.weboob.get_backends()
for name, b in backends.iteritems():
for message in b.iter_new_messages():
for name, backend in self.weboob.iter_backends():
for message in backend.iter_new_messages():
self.send_email(name, message)
def send_email(self, backend_name, mail):