diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-10 20:49:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-10 20:49:42 +0300 |
commit | ab236e4c360ea53514ec83e6c8909585f237aaf5 (patch) | |
tree | ec2a46d822d2323f785922dcf3a85a721a5f003a /testxml/testxml.py | |
parent | 4429504e764f0dec3ed4c0071b63819571c86253 (diff) | |
download | evol-tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.gz evol-tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.bz2 evol-tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.xz evol-tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.zip |
testxml: fix validating dye palette with GIMP color names.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-x | testxml/testxml.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 70b2865..c2b5856 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -256,20 +256,22 @@ def testDye(id, color, text, src, iserr): def testDyeInternal(id, col, text, src, iserr): - if col[0] != "#": + oldPalette = col[0] == "#" + if oldPalette == False and col[0] != "@": showMsg(id, "incorrect dye colors: " + text, src, iserr) return False - paletes = dyesplit2.split(col[1:]) - for palete in paletes: - if len(palete) != 6: - showMsg(id, "incorrect dye palete: " + text, src, iserr) - return False - - for char in palete.lower(): - if (char < '0' or char > '9') and (char < 'a' or char > 'f'): + if oldPalette: + paletes = dyesplit2.split(col[1:]) + for palete in paletes: + if len(palete) != 6: showMsg(id, "incorrect dye palete: " + text, src, iserr) return False + + for char in palete.lower(): + if (char < '0' or char > '9') and (char < 'a' or char > 'f'): + showMsg(id, "incorrect dye palete: " + text, src, iserr) + return False return True |