Mercurial > libervia-backend
changeset 2041:456abbceee19
jp (debug/bridge): fixed unicode handling of arguments
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Aug 2016 18:57:56 +0200 |
parents | f607349a01a4 |
children | 2e948c228643 |
files | frontends/src/jp/cmd_debug.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_debug.py Sun Aug 21 17:04:33 2016 +0200 +++ b/frontends/src/jp/cmd_debug.py Sun Aug 21 18:57:56 2016 +0200 @@ -35,7 +35,7 @@ except SyntaxError as e: self.disp(u"Can't evaluate arguments: {mess}\n{text}\n{offset}^".format( mess=e, - text=e.text, + text=e.text.decode('utf-8'), offset=u" "*(e.offset-1) ), error=True) self.host.quit(C.EXIT_BAD_ARG) @@ -52,7 +52,7 @@ def add_parser_options(self): self.parser.add_argument("method", type=str, help=_(u"name of the method to execute")) - self.parser.add_argument("arg", nargs="*", help=_(u"argument of the method")) + self.parser.add_argument("arg", type=base.unicode_decoder, nargs="*", help=_(u"argument of the method")) def method_cb(self, ret): self.disp(unicode(ret)) @@ -83,7 +83,7 @@ def add_parser_options(self): self.parser.add_argument("signal", type=str, help=_(u"name of the signal to send")) - self.parser.add_argument("arg", nargs="*", help=_(u"argument of the signal")) + self.parser.add_argument("arg", type=base.unicode_decoder, nargs="*", help=_(u"argument of the signal")) def start(self): args = self.evalArgs()