Skip to content
Snippets Groups Projects
Commit 0d6748ee authored by Dan Williams's avatar Dan Williams
Browse files

test: (sms-get.py) don't fail if we don't get an SMSC

parent cd6e6554
No related branches found
Tags gst-plugins-ugly-1.7.91
Loading
......@@ -55,7 +55,13 @@ msgs = sms.List()
i = 0
for m in msgs:
print "-------------------------------------------------------------------"
print "%d: From: %s Time: %s SMSC: %s" % (m["index"], m["number"], m["timestamp"], m["smsc"])
smsc = ""
try:
smsc = m["smsc"]
except KeyError:
pass
print "%d: From: %s Time: %s SMSC: %s" % (m["index"], m["number"], m["timestamp"], smsc)
if len(m["text"]):
print " %s\n" % m["text"]
elif len(m["data"]):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment