weboob-config now supports new Value* classes instead of BackendConfig ones

This commit is contained in:
Romain Bignon 2010-10-26 20:59:49 +02:00
commit 8777e6c1d3
2 changed files with 47 additions and 32 deletions

View file

@ -73,7 +73,7 @@ class WeboobCfg(ReplApplication):
row = OrderedDict([('Instance name', instance_name),
('Backend', name),
('Configuration', ', '.join(
'%s=%s' % (key, ('*****' if key in backend.config and backend.config[key].is_masked \
'%s=%s' % (key, ('*****' if key in backend.config and backend.config[key].masked \
else value)) \
for key, value in params.iteritems())),
])
@ -145,7 +145,7 @@ class WeboobCfg(ReplApplication):
print '| Capabilities | %s' % ', '.join([cap.__name__ for cap in backend.iter_caps()])
first = True
for key, field in backend.config.iteritems():
value = field.description
value = field.label
if not field.default is None:
value += ' (default: %s)' % field.default
if first: