From 9615390c51f98f349137e8c39d7ed6ee8dc1f515 Mon Sep 17 00:00:00 2001 From: Josh Friend Date: Sat, 13 Dec 2014 11:06:24 -0500 Subject: [PATCH] dont assume presence of colour package (fixes #104) --- sqlalchemy_utils/types/color.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlalchemy_utils/types/color.py b/sqlalchemy_utils/types/color.py index 0064243..21f9c2a 100644 --- a/sqlalchemy_utils/types/color.py +++ b/sqlalchemy_utils/types/color.py @@ -5,9 +5,9 @@ from .scalar_coercible import ScalarCoercible colour = None try: - import colour + from colour import Colour as python_colour_type except ImportError: - pass + python_colour_type = None class ColorType(types.TypeDecorator, ScalarCoercible): @@ -49,7 +49,7 @@ class ColorType(types.TypeDecorator, ScalarCoercible): """ STORE_FORMAT = u'hex' impl = types.Unicode(20) - python_type = colour.Color + python_type = python_colour_type def __init__(self, max_length=20, *args, **kwargs): # Fail if colour is not found.