new parameter -C to load configured backends
This commit is contained in:
parent
a7d2aa21e8
commit
1a4189afa1
1 changed files with 7 additions and 1 deletions
|
|
@ -29,6 +29,9 @@ 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]
|
||||
|
|
@ -38,7 +41,10 @@ class WeboobCli(ConsoleApplication):
|
|||
cmd = argv[2]
|
||||
args = argv[3:]
|
||||
|
||||
self.load_backends(cap_s)
|
||||
if self.options.configured:
|
||||
self.load_configured_backends(cap_s)
|
||||
else:
|
||||
self.load_backends(cap_s)
|
||||
|
||||
for backend, obj in self.weboob.do(cmd, *args):
|
||||
self.format(obj, backend.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue