aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-03 22:10:49 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-03 22:10:49 +0800
commit38475662119dacc1260c209f67f0cc87ee9f4da8 (patch)
treec8fbf771f1521d3d4562e22373abf737441f5d44 /bin
parentbdd85b60a644ade10c5f93825ea3c147ce6c7eec (diff)
downloadfg21sim-38475662119dacc1260c209f67f0cc87ee9f4da8.tar.bz2
bin/{healpix2hpx,hpx2healpix}: Use argparse choices
Diffstat (limited to 'bin')
-rwxr-xr-xbin/healpix2hpx5
-rwxr-xr-xbin/hpx2healpix5
2 files changed, 6 insertions, 4 deletions
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",
diff --git a/bin/hpx2healpix b/bin/hpx2healpix
index c9a916c..ce83553 100755
--- a/bin/hpx2healpix
+++ b/bin/hpx2healpix
@@ -42,8 +42,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",