add backend.name param for new ConsoleApplication.format() method
This commit is contained in:
parent
6936a6fe63
commit
7b8798efd9
2 changed files with 4 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue