Mercurial > libervia-backend
diff frontends/src/jp/cmd_pubsub.py @ 2317:f4e05600577b
jp (arg_tools): args is not modified anymore in get_use_args + fixed args returned + parser_args are returned separatly (return is now a tuple)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Jul 2017 22:49:55 +0200 |
parents | 7b448ac50a69 |
children | ddb67c186f61 |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_pubsub.py Sat Jul 08 21:54:24 2017 +0200 +++ b/frontends/src/jp/cmd_pubsub.py Sat Jul 08 22:49:55 2017 +0200 @@ -683,12 +683,14 @@ 'node': metadata[u'node'], 'item': item_elt.get('id'), } - args = arg_tools.get_use_args(self.host, - self.args.command, - use, - verbose=self.host.verbosity > 1 - ) - cmd_args = sys.argv[0:1] + args + self.args.command + # we need to send a copy of self.args.command + # else it would be modified + parser_args, use_args = arg_tools.get_use_args(self.host, + self.args.command, + use, + verbose=self.host.verbosity > 1 + ) + cmd_args = sys.argv[0:1] + parser_args + use_args else: cmd_args = self.args.command