check.py : Fix range check.
This commit is contained in:
parent
8334e811d5
commit
4224a5863a
1 changed files with 6 additions and 1 deletions
7
check.py
7
check.py
|
@ -72,7 +72,12 @@ def check_mapping (mappingstring):
|
|||
error ("Invalid value \"" + value + "\" for key \"" + key +
|
||||
"\". Should start with a, b, or h")
|
||||
elif value[0] in ['a', 'b']:
|
||||
if not value[1:].isnumeric():
|
||||
if value[0] == 'a' and value[-1] in ['-', '+', '~']:
|
||||
if not value[1:-1].isnumeric():
|
||||
error ("Invalid value \"" + value + "\" for key \""
|
||||
+ key + "\". Should be followed by a number " +
|
||||
"after 'a'")
|
||||
elif not value[1:].isnumeric():
|
||||
error ("Invalid value \"" + value + "\" for key \"" + key +
|
||||
"\". Should be followed by a number after 'a' or " +
|
||||
"'b'")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue