mirror of https://github.com/apache/superset.git
v0.7.0
This commit is contained in:
parent
b472cad5d1
commit
012a651586
|
@ -131,12 +131,6 @@ class ColorFactory(object):
|
|||
self.hash_based = hash_based
|
||||
|
||||
def get(self, s):
|
||||
"""
|
||||
Get a consistent color from the same string using a hash function
|
||||
|
||||
>>> color("foo")
|
||||
'#FF5A5F'
|
||||
"""
|
||||
if self.hash_based:
|
||||
s = s.encode('utf-8')
|
||||
h = hashlib.md5(s)
|
||||
|
|
Loading…
Reference in New Issue