mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Aleksander Morgado <aleksander@aleksander.es>
To: barebox@lists.infradead.org
Cc: Aleksander Morgado <aleksander@aleksander.es>
Subject: [PATCH] bbremote: rename command subparser variables
Date: Sun, 28 Jan 2018 11:33:26 +0100	[thread overview]
Message-ID: <20180128103326.16447-1-aleksander@aleksander.es> (raw)

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

             reply	other threads:[~2018-01-28 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 10:33 Aleksander Morgado [this message]
2018-01-30  6:55 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180128103326.16447-1-aleksander@aleksander.es \
    --to=aleksander@aleksander.es \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox