neingeist
/
smstool
Archived
1
0
Fork 0

Fix for gnokii

master
neingeist 17 years ago
parent 177c9f58a5
commit 173d4a16d8

@ -79,19 +79,25 @@ class SimserFrame(wxFrame):
self.foodialog.Show(true) self.foodialog.Show(true)
return return
# Remove funny characters
nr = re.sub("\(", "", nr)
nr = re.sub("\)", "", nr)
nr = re.sub(" ", "", nr)
# Quote text # Quote text
text = re.sub("'", "''", text) text = re.sub("'", "''", text)
nr = re.sub("'", "''", nr) nr = re.sub("'", "''", nr)
# Send SMS and report back # Send SMS and report back
rc = os.system("echo '" + text + "' | gsmsendsms '" + nr + "'") #rc = os.system("echo '" + text + "' | gsmsendsms '" + nr + "'")
rc = os.system("echo '" + text + "' | gnokii --sendsms '" + nr + "'")
if(rc == 0): if(rc == 0):
self.foodialog = wxMessageDialog(self.panel, self.foodialog = wxMessageDialog(self.panel,
"Message sent to " + nr, "Message sent to " + nr,
"Success", wxOK, wxPoint(100, 100)) "Success", wxOK, wxPoint(100, 100))
else: else:
self.foodialog = wxMessageDialog(self.panel, self.foodialog = wxMessageDialog(self.panel,
"gsmsendsms returned error code: " + str(rc >> 8), "returned error code: " + str(rc >> 8),
"Error", wxOK, wxPoint(100, 100)) "Error", wxOK, wxPoint(100, 100))
self.foodialog.Show(true) self.foodialog.Show(true)