all loaded backends are now configured (refs #368)
This commit is contained in:
parent
8afff42465
commit
9581fa0b19
15 changed files with 17 additions and 45 deletions
|
|
@ -39,7 +39,7 @@ class Boobank(ConsoleApplication):
|
|||
|
||||
@ConsoleApplication.command('List every available accounts')
|
||||
def command_list(self):
|
||||
self.load_configured_backends(ICapBank)
|
||||
self.load_backends(ICapBank)
|
||||
tot_balance = 0.0
|
||||
tot_coming = 0.0
|
||||
try:
|
||||
|
|
@ -63,7 +63,7 @@ class Boobank(ConsoleApplication):
|
|||
def command_history(self, id):
|
||||
id, backend_name = self.parse_id(id)
|
||||
names = (backend_name,) if backend_name is not None else None
|
||||
self.load_configured_backends(ICapBank, names=names)
|
||||
self.load_backends(ICapBank, names=names)
|
||||
|
||||
def do(backend):
|
||||
account = backend.get_account(id)
|
||||
|
|
@ -76,7 +76,7 @@ class Boobank(ConsoleApplication):
|
|||
def command_coming(self, id):
|
||||
id, backend_name = self.parse_id(id)
|
||||
names = (backend_name,) if backend_name is not None else None
|
||||
self.load_configured_backends(ICapBank, names=names)
|
||||
self.load_backends(ICapBank, names=names)
|
||||
|
||||
def do(backend):
|
||||
account = backend.get_account(id)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Chatoob(ConsoleApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2010 Christophe Benz'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_configured_backends(ICapChat)
|
||||
self.load_backends(ICapChat)
|
||||
#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:])
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Geolooc(ConsoleApplication):
|
|||
print >>sys.stderr, 'Syntax: %s ipaddr' % argv[0]
|
||||
return 1
|
||||
|
||||
self.load_configured_backends(ICapGeolocIp)
|
||||
self.load_backends(ICapGeolocIp)
|
||||
for backend, location in self.do('get_location', argv[1]):
|
||||
self.format(location)
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class HaveSex(PromptApplication):
|
|||
|
||||
def main(self, argv):
|
||||
self.load_config()
|
||||
self.load_configured_backends(ICapDating, storage=self.create_storage(self.STORAGE_FILENAME))
|
||||
self.load_backends(ICapDating, storage=self.create_storage(self.STORAGE_FILENAME))
|
||||
|
||||
self.do('init_optimizations').wait()
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class Monboob(ConsoleApplication):
|
|||
|
||||
def main(self, argv):
|
||||
self.load_config()
|
||||
self.load_configured_backends(ICapMessages, storage=self.create_storage())
|
||||
self.load_backends(ICapMessages, storage=self.create_storage())
|
||||
|
||||
return self.process_command(*argv[1:])
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class QBoobMsg(QtApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_configured_backends(ICapMessages, storage=self.create_storage())
|
||||
self.load_backends(ICapMessages, storage=self.create_storage())
|
||||
|
||||
self.main_window = MainWindow(self.config, self.weboob)
|
||||
self.main_window.show()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class QHaveSex(QtApplication):
|
|||
|
||||
def main(self, argv):
|
||||
self.create_storage(self.STORAGE_FILENAME)
|
||||
self.load_configured_backends(ICapDating)
|
||||
self.load_backends(ICapDating)
|
||||
|
||||
self.main_window = MainWindow(self.config, self.weboob)
|
||||
self.main_window.show()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class QWeboobCfg(QtApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_configured_backends()
|
||||
self.load_backends()
|
||||
|
||||
self.dlg = BackendCfg(self.weboob)
|
||||
self.dlg.show()
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ class WeboobCli(ConsoleApplication):
|
|||
VERSION = '0.1'
|
||||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def add_application_options(self, group):
|
||||
group.add_option('-C', '--configured', action='store_true', help='load configured backends')
|
||||
|
||||
def main(self, argv):
|
||||
if len(argv) < 3:
|
||||
print >>sys.stderr, "Syntax: %s capability command [args ..]" % argv[0]
|
||||
|
|
@ -41,10 +38,7 @@ class WeboobCli(ConsoleApplication):
|
|||
cmd = argv[2]
|
||||
args = argv[3:]
|
||||
|
||||
if self.options.configured:
|
||||
self.load_configured_backends(cap_s)
|
||||
else:
|
||||
self.load_backends(cap_s)
|
||||
self.load_backends(cap_s)
|
||||
|
||||
for backend, obj in self.do(cmd, *args):
|
||||
self.format(obj)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Weboorrents(ConsoleApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_configured_backends(ICapTorrent)
|
||||
self.load_backends(ICapTorrent)
|
||||
return self.process_command(*argv[1:])
|
||||
|
||||
@ConsoleApplication.command('Get information about a torrent')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue