From 00ba0f5b87566ca4865412ffe153fdede849fd4e Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 3 Apr 2021 08:13:33 +0800 Subject: [PATCH] make multiarg deprecated options consume both args (fixes --setchan) --- meshtastic/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 636de12..5c87f1c 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -627,8 +627,8 @@ def initParser(): parser.add_argument("--noproto", help="Don't start the API, just function as a dumb serial terminal.", action="store_true") - parser.add_argument('--setchan', dest='deprecated', - action='store_true', help='Deprecated, use "--ch-set param value" instead') + parser.add_argument('--setchan', dest='deprecated', nargs=2, action='append', + help='Deprecated, use "--ch-set param value" instead') parser.add_argument('--set-router', dest='deprecated', action='store_true', help='Deprecated, use "--set is_router true" instead') parser.add_argument('--unset-router', dest='deprecated',