From df068b8e30b9af2d00dcc3cfec933c1479935d3c Mon Sep 17 00:00:00 2001 From: alban Date: Tue, 13 Oct 2020 22:01:46 +0200 Subject: [PATCH] [fix] exceptions for redilisys colors filter --- clitools/filters/redilysis_colors.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 clitools/filters/redilysis_colors.py diff --git a/clitools/filters/redilysis_colors.py b/clitools/filters/redilysis_colors.py old mode 100644 new mode 100755 index 230fa08..2b4abc1 --- a/clitools/filters/redilysis_colors.py +++ b/clitools/filters/redilysis_colors.py @@ -1,4 +1,3 @@ - #!/usr/bin/python3 # -*- coding: utf-8 -*- # -*- mode: Python -*- @@ -145,8 +144,11 @@ def default( pl ): colorTuple = int2rgb(ocolor) x = point[0] dist = abs(x - max_width/2) - key = int(2* dist / max_width * 8) - power = spect[key] / spect10Correct[key] * chaos + key = int(2* dist / max_width * 7) + try: + power = spect[key] / spect10Correct[key] * chaos + except: + pass color = [] for i in colorTuple: new_color = int(i * power)