chirpc: add --list-radios option (#2343)

The current list of radios is too long to present to the user in
the --help text, so this splits the list out into its own option.
This commit is contained in:
Zach Welch 2015-02-25 08:17:24 -08:00
parent 319a568c65
commit 97c9809394

9
chirpc
View file

@ -137,8 +137,9 @@ if __name__ == "__main__":
help="Set mode (%s)" % ",".join(chirp_common.MODES))
parser.add_argument("-r", "--radio", dest="radio",
default=None,
help="Radio model (one of %s)" % ",".join(RADIOS.keys()))
help="Radio model (see --list-radios)")
parser.add_argument("--list-radios", action="store_true",
help="List radio models")
parser.add_argument("--mmap", dest="mmap",
default=None,
help="Radio memory map file location")
@ -159,6 +160,10 @@ if __name__ == "__main__":
options = parser.parse_args()
args = options.args
if options.list_radios:
print "Supported Radios:\n\t", "\n\t".join(sorted(RADIOS.keys()))
sys.exit(0)
if options.id:
from chirp import icf