summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/pynche/ColorDB.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py
index effed55..b57ad6f 100644
--- a/Tools/pynche/ColorDB.py
+++ b/Tools/pynche/ColorDB.py
@@ -177,7 +177,8 @@ def rrggbb_to_triplet(color, atoi=string.atoi):
"""Converts a #rrggbb color to the tuple (red, green, blue)."""
rgbtuple = _namedict.get(color)
if rgbtuple is None:
- assert color[0] == '#'
+ if color[0] <> '#':
+ raise BadColor(color)
red = color[1:3]
green = color[3:5]
blue = color[5:7]