comparison fail.py @ 5:b407681e6f2c

fix parameter type
author Jeff Hammel <k0scist@gmail.com>
date Tue, 23 Aug 2016 16:36:39 -0700
parents 8dc420754023
children 6496dae95f0d
comparison
equal deleted inserted replaced
4:8dc420754023 5:b407681e6f2c
15 """CLI""" 15 """CLI"""
16 16
17 # parse command line 17 # parse command line
18 parser = argparse.ArgumentParser(description=__doc__) 18 parser = argparse.ArgumentParser(description=__doc__)
19 parser.add_argument('command', help="command to run") 19 parser.add_argument('command', help="command to run")
20 parser.add_argument('--code', dest='codes', default=(0,), nargs='+', 20 parser.add_argument('--code', dest='codes',
21 default=(0,), nargs='+',
22 type=int,
21 help="allowed exit codes [DEFAULT: 0]") 23 help="allowed exit codes [DEFAULT: 0]")
22 parser.add_argument('-s', '--sleep', dest='sleep', 24 parser.add_argument('-s', '--sleep', dest='sleep',
23 type=float, default=1., 25 type=float, default=1.,
24 help="sleep between iterations [DEFAULT: %(default)s]") 26 help="sleep between iterations [DEFAULT: %(default)s]")
25 options = parser.parse_args(args) 27 options = parser.parse_args(args)