Skip to content

Commit 871432f

Browse files
Merge pull request geekcomputers#205 from mayararysia/master
spaces between the '=' character added
2 parents 9b1e173 + 5a1adc3 commit 871432f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

python_sms.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@
1515
import sqlite3
1616
import sys
1717

18-
dropbox= os.getenv("dropbox")
19-
scripts=os.getenv("scripts")
20-
dbfile=("database/maindatabase.db")
21-
master_db=os.path.join(dropbox, dbfile)
18+
dropbox = os.getenv("dropbox")
19+
scripts = os.getenv("scripts")
20+
dbfile = ("database/maindatabase.db")
21+
master_db = os.path.join(dropbox, dbfile)
2222

23-
f=open(scripts+'/output/student.txt','a')
23+
f = open(scripts+'/output/student.txt','a')
2424

25-
tdate=strftime("%d-%m")
25+
tdate = strftime("%d-%m")
2626

2727
conn = sqlite3.connect(master_db)
2828
cursor = conn.cursor()
29-
loc_stmt='SELECT name, number from table'
29+
loc_stmt = 'SELECT name, number from table'
3030
cursor.execute(loc_stmt)
3131
while True:
3232
row = cursor.fetchone()
3333
if row == None:
3434
break
35-
sname=row[0]
36-
snumber=row[1]
35+
sname = row[0]
36+
snumber = row[1]
3737

3838
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')
3939

@@ -69,7 +69,7 @@
6969
try:
7070
response = urllib2.urlopen(req)
7171
response_url = response.geturl()
72-
if response_url==url:
72+
if response_url == url:
7373
print 'SMS sent!'
7474
except urllib2.URLError, e:
7575
print 'Send failed!'

0 commit comments

Comments
 (0)