From 5c982ed500b51f5b8d911e5a5adec10ac2d31d2e Mon Sep 17 00:00:00 2001 From: yo mama Date: Wed, 23 Sep 2015 23:27:27 -0700 Subject: ok good --- lib/Param/Color/__init__.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 lib/Param/Color/__init__.py (limited to 'lib/Param/Color') diff --git a/lib/Param/Color/__init__.py b/lib/Param/Color/__init__.py deleted file mode 100644 index 9163338..0000000 --- a/lib/Param/Color/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -from Param import Param -import re -class ParamColor(Param): - def __init__(self, value, classname=""): - super(ParamColor, self).__init__(classname=classname) - try: - self.value = self._color_sanitize(value) - except Exception as e: - self.err_warn("Unable to sanitize the color: %s" % str(value)) - self.err_warn(str(e)) - def _color_sanitize(self, s): - if s == "": - return "transparent" - if re.match('(rgba?\([0-9]+,[0-9]+,[0-9]+\))|([a-zA-Z]+)|(\#[A-Ha-h0-9]+)', s): - return s.replace(' ', ''); - else: - self.err_warn("Not a color: {}\n".format(s)) -- cgit v1.2.3-70-g09d2