Mercurial > libervia-backend
diff frontends/src/jp/cmd_param.py @ 1594:313f2bb7841b
jp: profile session can now be started without connection:
- a new need_connect option is used when during BaseCommand init
- if need_connect is True, profile connection is necessary, so use_profile must be True too
- if need_connect if False, session can be started without connection, use_profile must be True
- if need_connect is None, use_profile can be True (need_connect will be set to True) or False (need_connect is not used)
- if need_connect is False (and so use_profile is True), a new --start-session option is usable
- param get and set are the first commands to use this option, so parameters can be changed if connection is not working
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 14 Nov 2015 19:18:10 +0100 |
parents | 791c45ed8659 |
children | d17772b0fe22 |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_param.py Sat Nov 14 19:18:10 2015 +0100 +++ b/frontends/src/jp/cmd_param.py Sat Nov 14 19:18:10 2015 +0100 @@ -26,7 +26,7 @@ class Get(base.CommandBase): def __init__(self, host): - super(Get, self).__init__(host, 'get', help=_('Get a parameter value')) + super(Get, self).__init__(host, 'get', need_connect=False, help=_('Get a parameter value')) def add_parser_options(self): self.parser.add_argument("category", nargs='?', type=base.unicode_decoder, help=_(u"Category of the parameter")) @@ -59,7 +59,7 @@ class Set(base.CommandBase): def __init__(self, host): - super(Set, self).__init__(host, 'set', help=_('Set a parameter value')) + super(Set, self).__init__(host, 'set', need_connect=False, help=_('Set a parameter value')) def add_parser_options(self): self.parser.add_argument("category", type=base.unicode_decoder, help=_(u"Category of the parameter"))