diff --git a/weboob/applications/boobank/boobank.py b/weboob/applications/boobank/boobank.py index 47393baf..516e9131 100644 --- a/weboob/applications/boobank/boobank.py +++ b/weboob/applications/boobank/boobank.py @@ -41,7 +41,7 @@ class Boobank(ConsoleApplication): @ConsoleApplication.command('List every available accounts') def command_list(self): try: - for backend, account in self.weboob.do('iter_accounts'): + for backend, account in self.do('iter_accounts'): self.format(account, backend.name) except weboob.core.CallErrors, errors: for backend, error, backtrace in errors: @@ -59,7 +59,7 @@ class Boobank(ConsoleApplication): return backend.iter_operations(account) try: - for backend, operation in self.weboob.do(do): + for backend, operation in self.do(do): self.format(operation, backend.name) total += operation.amount except weboob.core.CallErrors, errors: diff --git a/weboob/applications/chatoob/chatoob.py b/weboob/applications/chatoob/chatoob.py index 3447f89d..221ef2d5 100644 --- a/weboob/applications/chatoob/chatoob.py +++ b/weboob/applications/chatoob/chatoob.py @@ -33,7 +33,7 @@ class Chatoob(ConsoleApplication): def main(self, argv): self.load_configured_backends(ICapChat) - #for backend, result in self.weboob.do('start_chat_polling', self.on_new_chat_message): + #for backend, result in self.do('start_chat_polling', self.on_new_chat_message): #logging.info(u'Polling chat messages for backend %s' % backend) return self.process_command(*argv[1:]) @@ -46,16 +46,16 @@ class Chatoob(ConsoleApplication): @ConsoleApplication.command('list online contacts') def command_list(self): - for backend, contact in self.weboob.do('iter_contacts', status=Contact.STATUS_ONLINE, caps=ICapContact): + for backend, contact in self.do('iter_contacts', status=Contact.STATUS_ONLINE, caps=ICapContact): self.format(contact, backend.name) @ConsoleApplication.command('get messages') def command_messages(self): - for backend, message in self.weboob.do('iter_chat_messages'): + for backend, message in self.do('iter_chat_messages'): self.format(message, backend.name) @ConsoleApplication.command('send message to contact') def command_send(self, _id, message): - for backend, result in self.weboob.do('send_chat_message', _id, message): + for backend, result in self.do('send_chat_message', _id, message): if not result: logging.error(u'Failed to send message to contact id="%s" on backend "%s"' % (_id, backend.name)) diff --git a/weboob/applications/geolooc/geolooc.py b/weboob/applications/geolooc/geolooc.py index b41b39c6..275b846b 100644 --- a/weboob/applications/geolooc/geolooc.py +++ b/weboob/applications/geolooc/geolooc.py @@ -36,7 +36,7 @@ class Geolooc(ConsoleApplication): return 1 self.load_configured_backends(ICapGeolocIp) - for backend, location in self.weboob.do('get_location', argv[1]): + for backend, location in self.do('get_location', argv[1]): self.format(location, backend.name) return 0 diff --git a/weboob/applications/havesex/havesex.py b/weboob/applications/havesex/havesex.py index 90752565..d32daca9 100644 --- a/weboob/applications/havesex/havesex.py +++ b/weboob/applications/havesex/havesex.py @@ -40,7 +40,7 @@ class HaveSex(PromptApplication): self.load_config() self.load_configured_backends(ICapDating, storage=self.create_storage(self.STORAGE_FILENAME)) - self.weboob.do('init_optimizations').wait() + self.do('init_optimizations').wait() optimizations = self.config.get('optimizations') if optimizations: @@ -72,7 +72,7 @@ class HaveSex(PromptApplication): print '\t' * level + '%-20s %s' % (node.label + ':', value) found = 0 - for backend, contact in self.weboob.do('get_contact', _id, backends=backend_name): + for backend, contact in self.do('get_contact', _id, backends=backend_name): if contact: print 'Nickname:', contact.name if contact.status & contact.STATUS_ONLINE: @@ -101,7 +101,7 @@ class HaveSex(PromptApplication): def service(self, action, function, *params): sys.stdout.write('%s:' % action) - for backend, result in self.weboob.do(function, *params): + for backend, result in self.do(function, *params): if result: sys.stdout.write(' ' + backend.name) sys.stdout.flush() diff --git a/weboob/applications/monboob/monboob.py b/weboob/applications/monboob/monboob.py index 2126cdc6..4c89fae9 100644 --- a/weboob/applications/monboob/monboob.py +++ b/weboob/applications/monboob/monboob.py @@ -183,7 +183,7 @@ class Monboob(ConsoleApplication): self.weboob.loop() def process(self): - for backend, message in self.weboob.do('iter_new_messages'): + for backend, message in self.do('iter_new_messages'): self.send_email(backend, message) def send_email(self, backend, mail): diff --git a/weboob/applications/traveloob/traveloob.py b/weboob/applications/traveloob/traveloob.py index c6f9b2f3..b5b6044f 100644 --- a/weboob/applications/traveloob/traveloob.py +++ b/weboob/applications/traveloob/traveloob.py @@ -36,7 +36,7 @@ class Traveloob(ConsoleApplication): @ConsoleApplication.command('Search stations') def command_stations(self, pattern): self.load_backends(ICapTravel) - for backend, station in self.weboob.do('iter_station_search', pattern): + for backend, station in self.do('iter_station_search', pattern): self.format(station, backend.name) @ConsoleApplication.command('List all departures for a given station') @@ -58,5 +58,5 @@ class Traveloob(ConsoleApplication): backends = None self.load_backends(ICapTravel, names=backends) - for backend, departure in self.weboob.do('iter_station_departures', station_id, arrival_id): + for backend, departure in self.do('iter_station_departures', station_id, arrival_id): self.format(departure, backend.name) diff --git a/weboob/applications/videoob/videoob.py b/weboob/applications/videoob/videoob.py index d64302a4..081cd3aa 100644 --- a/weboob/applications/videoob/videoob.py +++ b/weboob/applications/videoob/videoob.py @@ -42,7 +42,7 @@ class Videoob(ConsoleApplication): _id, backend_name = self.parse_id(_id) names = (backend_name,) if backend_name is not None else None self.load_backends(ICapVideo, names=names) - for backend, video in self.weboob.do('get_video', _id): + for backend, video in self.do('get_video', _id): if video is None: continue self.format(video, backend.name) diff --git a/weboob/applications/weboobcli/weboobcli.py b/weboob/applications/weboobcli/weboobcli.py index a429b196..a8d2f11c 100644 --- a/weboob/applications/weboobcli/weboobcli.py +++ b/weboob/applications/weboobcli/weboobcli.py @@ -46,7 +46,7 @@ class WeboobCli(ConsoleApplication): else: self.load_backends(cap_s) - for backend, obj in self.weboob.do(cmd, *args): + for backend, obj in self.do(cmd, *args): self.format(obj, backend.name) return 0 diff --git a/weboob/applications/weboorrents/weboorrents.py b/weboob/applications/weboorrents/weboorrents.py index 0d20c3d6..1307fa73 100644 --- a/weboob/applications/weboorrents/weboorrents.py +++ b/weboob/applications/weboorrents/weboorrents.py @@ -40,7 +40,7 @@ class Weboorrents(ConsoleApplication): _id, backend_name = self.parse_id(id) found = 0 - for backend, torrent in self.weboob.do('get_torrent', _id, backends=backend_name): + for backend, torrent in self.do('get_torrent', _id, backends=backend_name): if torrent: self.format(torrent, backend.name) found = 1 @@ -52,7 +52,7 @@ class Weboorrents(ConsoleApplication): def command_getfile(self, id, dest): _id, backend_name = self.parse_id(id) - for backend, buf in self.weboob.do('get_torrent_file', _id, backends=backend_name): + for backend, buf in self.do('get_torrent_file', _id, backends=backend_name): if buf: if dest == '-': print buf @@ -66,5 +66,5 @@ class Weboorrents(ConsoleApplication): @ConsoleApplication.command('Search torrents') def command_search(self, pattern=None): self.set_formatter_header(u'Search pattern: %s' % pattern if pattern else u'Latest torrents') - for backend, torrent in self.weboob.do('iter_torrents', pattern=pattern): + for backend, torrent in self.do('iter_torrents', pattern=pattern): self.format(torrent, backend.name) diff --git a/weboob/applications/wetboobs/wetboobs.py b/weboob/applications/wetboobs/wetboobs.py index 4dc8887b..431356f1 100644 --- a/weboob/applications/wetboobs/wetboobs.py +++ b/weboob/applications/wetboobs/wetboobs.py @@ -38,13 +38,13 @@ class WetBoobs(ConsoleApplication): @ConsoleApplication.command('search cities') def command_search(self, pattern): - for backend, city in self.weboob.do('iter_city_search', pattern): + for backend, city in self.do('iter_city_search', pattern): self.format(city, backend.name) @ConsoleApplication.command('get current weather') def command_current(self, city): try: - for backend, current in self.weboob.do('get_current', city): + for backend, current in self.do('get_current', city): self.format(current, backend.name) except CallErrors, e: for error in e: @@ -56,7 +56,7 @@ class WetBoobs(ConsoleApplication): @ConsoleApplication.command('get forecasts') def command_forecasts(self, city): try: - for backend, forecast in self.weboob.do('iter_forecast', city): + for backend, forecast in self.do('iter_forecast', city): self.format(forecast, backend.name) except CallErrors, e: for error in e: