From 0fd66725ce0fac2c61089547b909707bc51aa4ae Mon Sep 17 00:00:00 2001 From: Sebastian Steuer Date: Fri, 29 Nov 2013 23:46:21 +0100 Subject: [PATCH] fix for end of run --- oven.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oven.py b/oven.py index ba11353..c205394 100644 --- a/oven.py +++ b/oven.py @@ -174,7 +174,10 @@ class Profile(): def is_rising(self,time): (prev_point,next_point) = self.get_surrounding_points(time) - return prev_point[1] < next_point[1] + if prev_point and next_point: + return prev_point[1] < next_point[1] + else: + return False def get_target_temperature(self,time): if time > self.get_duration():