add backend.name param for new ConsoleApplication.format() method

This commit is contained in:
Christophe Benz 2010-06-22 10:44:52 +02:00
commit 7b8798efd9
2 changed files with 4 additions and 4 deletions

View file

@ -46,12 +46,12 @@ class Chatoob(ConsoleApplication):
@ConsoleApplication.command('list online contacts')
def command_list(self):
for backend, contact in self.weboob.do('iter_chat_contacts', online=True, offline=False):
self.format(contact)
self.format(contact, backend.name)
@ConsoleApplication.command('get messages')
def command_messages(self):
for backend, message in self.weboob.do('iter_chat_messages'):
self.format(message)
self.format(message, backend.name)
@ConsoleApplication.command('send message to contact')
def command_send(self, _id, message):

View file

@ -38,9 +38,9 @@ class Travel(ConsoleApplication):
@ConsoleApplication.command('Search stations')
def command_stations(self, pattern):
for backend, station in self.weboob.do('iter_station_search', pattern):
self.format(station)
self.format(station, backend.name)
@ConsoleApplication.command('List all departures on a special station')
def command_departures(self, station, arrival=None):
for backend, departure in self.weboob.do('iter_station_departures', station, arrival):
self.format(departure)
self.format(departure, backend.name)