From 38475662119dacc1260c209f67f0cc87ee9f4da8 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 3 Oct 2016 22:10:49 +0800 Subject: bin/{healpix2hpx,hpx2healpix}: Use argparse choices --- bin/healpix2hpx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/healpix2hpx') diff --git a/bin/healpix2hpx b/bin/healpix2hpx index f90c637..c684e09 100755 --- a/bin/healpix2hpx +++ b/bin/healpix2hpx @@ -31,8 +31,9 @@ def main(): parser.add_argument("-F", "--float", action="store_true", help="use float (single precision) instead of double") parser.add_argument("-l", "--log", dest="loglevel", default=None, - help="log level (valid values: " - "DEBUG, INFO, WARNING, ERROR, CRITICAL)") + choices=["DEBUG", "INFO", "WARNING", + "ERROR", "CRITICAL"], + help="set the log level") parser.add_argument("-L", "--logfile", default=None, help="filename where to save the log messages") parser.add_argument("-Q", "--quiet", action="store_true", -- cgit v1.2.2