From 2a6b64725c782ded7a92e9ea231a942add9c1d73 Mon Sep 17 00:00:00 2001 From: Warkanum Date: Sun, 28 Dec 2014 17:56:33 +0200 Subject: [PATCH] fix redundant codE --- build1/boot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build1/boot.py b/build1/boot.py index 26341dc..67a844b 100755 --- a/build1/boot.py +++ b/build1/boot.py @@ -63,11 +63,7 @@ def TempsensorRead(): data = dht11_sensor.read(PIN_TC_WP) #print('Temp={0}*C Humidity={1}% Status={2} Error={3}'.format(data['temperature'], data['humidity'], data['valid'], data['err'])) if data['valid'] == 1: - validData = data - break - - if validData: - return validData + return data return None