* [PATCH] bbremote: rename command subparser variables
@ 2018-01-28 10:33 Aleksander Morgado
2018-01-30 6:55 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Aleksander Morgado @ 2018-01-28 10:33 UTC (permalink / raw)
To: barebox; +Cc: Aleksander Morgado
Don't reuse unrelated subparser variables for new command subparsers,
make each subparser have its own variable.
Just for consistency really, not a bugfix.
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
---
scripts/remote/main.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/remote/main.py b/scripts/remote/main.py
index bd304723b..79203df05 100644
--- a/scripts/remote/main.py
+++ b/scripts/remote/main.py
@@ -139,15 +139,15 @@ parser_run.set_defaults(func=handle_run)
parser_ping = subparsers.add_parser('ping', help="test connection")
parser_ping.set_defaults(func=handle_ping)
-parser_ping = subparsers.add_parser('getenv', help="get a barebox environment variable")
-parser_ping.add_argument('arg', nargs='+', help="variable name")
-parser_ping.set_defaults(func=handle_getenv)
+parser_getenv = subparsers.add_parser('getenv', help="get a barebox environment variable")
+parser_getenv.add_argument('arg', nargs='+', help="variable name")
+parser_getenv.set_defaults(func=handle_getenv)
-parser_run = subparsers.add_parser('listen', help="listen for an incoming connection")
-parser_run.set_defaults(func=handle_listen)
+parser_listen = subparsers.add_parser('listen', help="listen for an incoming connection")
+parser_listen.set_defaults(func=handle_listen)
-parser_run = subparsers.add_parser('console', help="connect to the console")
-parser_run.set_defaults(func=handle_console)
+parser_console = subparsers.add_parser('console', help="connect to the console")
+parser_console.set_defaults(func=handle_console)
args = parser.parse_args()
logging.basicConfig(level=VERBOSITY[args.verbose],
--
2.15.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bbremote: rename command subparser variables
2018-01-28 10:33 [PATCH] bbremote: rename command subparser variables Aleksander Morgado
@ 2018-01-30 6:55 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-01-30 6:55 UTC (permalink / raw)
To: Aleksander Morgado; +Cc: barebox
On Sun, Jan 28, 2018 at 11:33:26AM +0100, Aleksander Morgado wrote:
> Don't reuse unrelated subparser variables for new command subparsers,
> make each subparser have its own variable.
>
> Just for consistency really, not a bugfix.
>
> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
> ---
> scripts/remote/main.py | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/scripts/remote/main.py b/scripts/remote/main.py
> index bd304723b..79203df05 100644
> --- a/scripts/remote/main.py
> +++ b/scripts/remote/main.py
> @@ -139,15 +139,15 @@ parser_run.set_defaults(func=handle_run)
> parser_ping = subparsers.add_parser('ping', help="test connection")
> parser_ping.set_defaults(func=handle_ping)
>
> -parser_ping = subparsers.add_parser('getenv', help="get a barebox environment variable")
> -parser_ping.add_argument('arg', nargs='+', help="variable name")
> -parser_ping.set_defaults(func=handle_getenv)
> +parser_getenv = subparsers.add_parser('getenv', help="get a barebox environment variable")
> +parser_getenv.add_argument('arg', nargs='+', help="variable name")
> +parser_getenv.set_defaults(func=handle_getenv)
>
> -parser_run = subparsers.add_parser('listen', help="listen for an incoming connection")
> -parser_run.set_defaults(func=handle_listen)
> +parser_listen = subparsers.add_parser('listen', help="listen for an incoming connection")
> +parser_listen.set_defaults(func=handle_listen)
>
> -parser_run = subparsers.add_parser('console', help="connect to the console")
> -parser_run.set_defaults(func=handle_console)
> +parser_console = subparsers.add_parser('console', help="connect to the console")
> +parser_console.set_defaults(func=handle_console)
>
> args = parser.parse_args()
> logging.basicConfig(level=VERBOSITY[args.verbose],
> --
> 2.15.1
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-30 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 10:33 [PATCH] bbremote: rename command subparser variables Aleksander Morgado
2018-01-30 6:55 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox