From 5f86ea6c249c936b0476347982c8caed518ca894 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Feb 2014 18:45:45 +0100 Subject: use correct cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/curve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/curve.py b/src/curve.py index e7832f3..fadcb09 100644 --- a/src/curve.py +++ b/src/curve.py @@ -129,11 +129,11 @@ def cmf_10deg(temperature): @param temperature:float The blackbody temperature in kelvins, clipped to [1000, 40000] @return :(float, float, float) The red, green and blue components of the white point ''' - if cmf_2deg_cache is None: + if cmf_10deg_cache is None: with open(DATADIR + '/10deg', 'rb') as file: - cmf_2deg_cache = file.read() - cmf_2deg_cache.decode('utf-8', 'error').split('\n') - cmf_2deg_cache = [[float(x) for x in x_y.split(' ')] for x_y in cmf_2deg_cache] + cmf_10deg_cache = file.read() + cmf_10deg_cache.decode('utf-8', 'error').split('\n') + cmf_10deg_cache = [[float(x) for x in x_y.split(' ')] for x_y in cmf_10deg_cache] temperature = min(max(0, temperature), 1000) x, y = 0, 0 if (temp % 100) == 0: -- cgit v1.2.3-70-g09d2