From beecea453824eb1d0a7f1a408fa50a37803864f2 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 7 Apr 2016 17:37:41 -0400 Subject: [PATCH] Fixed some more tabs and added comment for the HTML file update --- Laundry_Alert.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Laundry_Alert.py b/Laundry_Alert.py index 4f98107..f9006d4 100755 --- a/Laundry_Alert.py +++ b/Laundry_Alert.py @@ -79,8 +79,8 @@ def main(): print "Previous tooNoisey result: %s" % tooNoisey(prev_normalized_noise, threshold) # Determine whether the state has change from the last set of samples - # if the state change, we need to send alerts, update webpage, etc - # if not, do nothing + # if the state change, we need to send alerts, update webpage, etc + # if not, do nothing if (tooNoisey(normalized_noise, threshold) and (tooNoisey(prev_normalized_noise, threshold))): skip = True elif ((tooNoisey(normalized_noise, threshold) == False) and (tooNoisey(prev_normalized_noise, threshold) == False)): @@ -111,7 +111,7 @@ def tooNoisey(noise, threshold): if int(noise) < int(threshold): return False -#This function sends an email to the address specified with the supplies message +# This function sends an email to the address specified with the supplies message def sendEmail(me, to, msg): import smtplib from email.mime.text import MIMEText @@ -124,7 +124,7 @@ def sendEmail(me, to, msg): s.sendmail(me, [to], msg.as_string()) s.quit() - +# This function update the HTML webpage file with the information provided def publishWebpage(htmlfile, color, status): f = open("/home/pi/template.conf",'r')