2015-10-09 | Paul Boddie | raw files shortlog changelog graph | Fixed option handling at the end of the argument list. | |
optimiser.py (file) |
1.1 --- a/optimiser.py Fri Oct 09 12:04:16 2015 +0200 1.2 +++ b/optimiser.py Fri Oct 09 14:20:02 2015 +0200 1.3 @@ -277,7 +277,7 @@ 1.4 def get_float(options, flag): 1.5 try: 1.6 i = options.index(flag) 1.7 - if options[i+1].isdigit(): 1.8 + if i+1 < len(options) and options[i+1].isdigit(): 1.9 return float(options[i+1]) 1.10 else: 1.11 return 1.0