From 7b418e0eef37007082acf05286232621e9a23294 Mon Sep 17 00:00:00 2001 From: mayararysia Date: Wed, 19 Jul 2017 12:55:00 -0300 Subject: [PATCH 1/2] spaces between the character ' = ' --- python_sms.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python_sms.py b/python_sms.py index 160c1692fb5..660a5721d40 100644 --- a/python_sms.py +++ b/python_sms.py @@ -15,25 +15,25 @@ import sqlite3 import sys -dropbox= os.getenv("dropbox") -scripts=os.getenv("scripts") -dbfile=("database/maindatabase.db") -master_db=os.path.join(dropbox, dbfile) +dropbox = os.getenv("dropbox") +scripts = os.getenv("scripts") +dbfile = ("database/maindatabase.db") +master_db = os.path.join(dropbox, dbfile) -f=open(scripts+'/output/student.txt','a') +f = open(scripts+'/output/student.txt','a') -tdate=strftime("%d-%m") +tdate = strftime("%d-%m") conn = sqlite3.connect(master_db) cursor = conn.cursor() -loc_stmt='SELECT name, number from table' +loc_stmt ='SELECT name, number from table' cursor.execute(loc_stmt) while True: row = cursor.fetchone() if row == None: break - sname=row[0] - snumber=row[1] + sname = row[0] + snumber = row[1] message = (sname + ' There will be NO training tonight on the ' + tdate + ' Sorry for the late notice, I have sent a mail as well, just trying to reach everyone, please do not reply to this message as this is automated') From 5a1adc379493409c7a0d993168c124a5eddb131e Mon Sep 17 00:00:00 2001 From: mayararysia Date: Wed, 19 Jul 2017 12:59:23 -0300 Subject: [PATCH 2/2] spaces between the character ' = ' --- python_sms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_sms.py b/python_sms.py index 660a5721d40..ea0273b935f 100644 --- a/python_sms.py +++ b/python_sms.py @@ -26,7 +26,7 @@ conn = sqlite3.connect(master_db) cursor = conn.cursor() -loc_stmt ='SELECT name, number from table' +loc_stmt = 'SELECT name, number from table' cursor.execute(loc_stmt) while True: row = cursor.fetchone() @@ -69,7 +69,7 @@ try: response = urllib2.urlopen(req) response_url = response.geturl() - if response_url==url: + if response_url == url: print 'SMS sent!' except urllib2.URLError, e: print 'Send failed!'