Mercurial > p > roundup > code
comparison roundup/configuration.py @ 5773:1151a2b31f1d
Yeah, let's actually return the option value.....
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 07 Jun 2019 17:28:12 -0400 |
| parents | 8dbe307bdb57 |
| children | 765f8c0e99ef |
comparison
equal
deleted
inserted
replaced
| 5772:8dbe307bdb57 | 5773:1151a2b31f1d |
|---|---|
| 482 try: | 482 try: |
| 483 v = int(value) | 483 v = int(value) |
| 484 if v < 0: | 484 if v < 0: |
| 485 raise OptionValueError(self, value, | 485 raise OptionValueError(self, value, |
| 486 "Integer number greater than or equal to zero required") | 486 "Integer number greater than or equal to zero required") |
| 487 return v | |
| 487 except OptionValueError: | 488 except OptionValueError: |
| 488 raise # pass through subclass | 489 raise # pass through subclass |
| 489 except ValueError: | 490 except ValueError: |
| 490 raise OptionValueError(self, value, "Integer number required") | 491 raise OptionValueError(self, value, "Integer number required") |
| 491 | 492 |
