Debug
This commit is contained in:
parent
84394cb3b8
commit
50a721267a
@ -38,9 +38,15 @@ def sendmessage(target, message):
|
||||
|
||||
for chatitem in response['resp']['chatItems']:
|
||||
statusdict = chatitem['chatItem']['meta']['itemStatus']
|
||||
status = statusdict['sndProgress']
|
||||
smessage = chatitem['chatItem']['meta']['itemText']
|
||||
print("Message '%s' sent over websocket to %s, status was %s" % (smessage, target, status))
|
||||
try:
|
||||
status = statusdict['sndProgress']
|
||||
except KeyError:
|
||||
print("FAILED")
|
||||
pprint(statusdict)
|
||||
status = 'FAILED'
|
||||
else:
|
||||
smessage = chatitem['chatItem']['meta']['itemText']
|
||||
print("Message '%s' sent over websocket to %s, status was %s" % (smessage, target, status))
|
||||
|
||||
if status == 'complete':
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user