changeset 3d2efaaacd64 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=3d2efaaacd64
description:
Do not compute dominant color in debug mode
diffstat:
app.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r c323c9b92faa -r 3d2efaaacd64 app.py
--- a/app.py Tue Oct 22 12:26:11 2019 +0200
+++ b/app.py Tue Oct 22 17:30:58 2019 +0200
@@ -217,6 +217,8 @@
@cache.memoize(timeout=365 * 24 * 60 * 60)
def dominant_color(path):
+ if app.debug:
+ return '#000'
color = ColorThief(
os.path.join(app.static_folder, path)).get_color(quality=1)
return '#%02x%02x%02x' % color