From 1f9125af88ad9d13a7de6f972032dd810da300d6 Mon Sep 17 00:00:00 2001 From: Philippe Daouadi Date: Fri, 25 Apr 2014 21:42:08 +0200 Subject: [PATCH] bugfix: crash when using fractions --- colout/colout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colout/colout.py b/colout/colout.py index 3d3ebc0..17ef20f 100755 --- a/colout/colout.py +++ b/colout/colout.py @@ -377,7 +377,7 @@ def color_scale( name, text ): import babel.numbers as bn try: f = float(bn.parse_decimal(nb)) - except NumberFormatError: + except bn.NumberFormatError: f = eval(nb) # Note: in python2, `eval(2/3)` would produce `0`, in python3 `0.666` except ImportError: try: