"weboob-config edit" prompts user to edit one backend, instead of opening ~/.weboob/backends with $EDITOR.
This commit is contained in:
parent
ac7274cafd
commit
7677ce4016
1 changed files with 7 additions and 6 deletions
|
|
@ -138,14 +138,15 @@ class WeboobCfg(ReplApplication):
|
|||
|
||||
def do_edit(self, line):
|
||||
"""
|
||||
edit
|
||||
edit NAME
|
||||
|
||||
Edit configuration file.
|
||||
Edit a backend
|
||||
"""
|
||||
if line:
|
||||
print 'This command takes no argument.'
|
||||
else:
|
||||
subprocess.call([os.environ.get('EDITOR', 'vi'), self.weboob.backends_config.confpath])
|
||||
try:
|
||||
self.edit_backend(line)
|
||||
except KeyError, e:
|
||||
print >>sys.stderr, 'Error: backend "%s" not found' % line
|
||||
return 1
|
||||
|
||||
def do_backends(self, line):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue