[S] Change in pysim[master]: pySim-shell: permit string with spaces for 'echo' command
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34947?usp=email ) Change subject: pySim-shell: permit string with spaces for 'echo' command .. pySim-shell: permit string with spaces for 'echo' command before this patch: pySIM-shell (00:MF)> echo foo bar baz usage: echo [-h] string echo: error: unrecognized arguments: bar baz after this patch: pySIM-shell (00:MF)> echo foo bar baz foo bar baz Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 --- M pySim-shell.py 1 file changed, 22 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/pySim-shell.py b/pySim-shell.py index d9c9f8c..306dd40 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -510,13 +510,13 @@ first = False echo_parser = argparse.ArgumentParser() -echo_parser.add_argument('string', help="string to echo on the shell") +echo_parser.add_argument('string', help="string to echo on the shell", nargs='+') @cmd2.with_argparser(echo_parser) @cmd2.with_category(CUSTOM_CATEGORY) def do_echo(self, opts): """Echo (print) a string on the console""" -self.poutput(opts.string) +self.poutput(' '.join(opts.string)) @cmd2.with_category(CUSTOM_CATEGORY) def do_version(self, opts): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34947?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 Gerrit-Change-Number: 34947 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in pysim[master]: pySim-shell: permit string with spaces for 'echo' command
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34947?usp=email ) Change subject: pySim-shell: permit string with spaces for 'echo' command .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34947?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 Gerrit-Change-Number: 34947 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Comment-Date: Fri, 03 Nov 2023 06:01:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: pySim-shell: permit string with spaces for 'echo' command
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/34947?usp=email ) Change subject: pySim-shell: permit string with spaces for 'echo' command .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34947?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 Gerrit-Change-Number: 34947 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 02 Nov 2023 09:36:28 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: pySim-shell: permit string with spaces for 'echo' command
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34947?usp=email ) Change subject: pySim-shell: permit string with spaces for 'echo' command .. pySim-shell: permit string with spaces for 'echo' command before this patch: pySIM-shell (00:MF)> echo foo bar baz usage: echo [-h] string echo: error: unrecognized arguments: bar baz after this patch: pySIM-shell (00:MF)> echo foo bar baz foo bar baz Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 --- M pySim-shell.py 1 file changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/34947/1 diff --git a/pySim-shell.py b/pySim-shell.py index d9c9f8c..306dd40 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -510,13 +510,13 @@ first = False echo_parser = argparse.ArgumentParser() -echo_parser.add_argument('string', help="string to echo on the shell") +echo_parser.add_argument('string', help="string to echo on the shell", nargs='+') @cmd2.with_argparser(echo_parser) @cmd2.with_category(CUSTOM_CATEGORY) def do_echo(self, opts): """Echo (print) a string on the console""" -self.poutput(opts.string) +self.poutput(' '.join(opts.string)) @cmd2.with_category(CUSTOM_CATEGORY) def do_version(self, opts): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/34947?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9 Gerrit-Change-Number: 34947 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange