Fixed #4 by appending a single message to list.
This commit is contained in:
parent
57243129a3
commit
9e6e294491
|
@ -64,10 +64,16 @@ def fritzab2matrix():
|
||||||
return messages
|
return messages
|
||||||
|
|
||||||
l = get_message_list(message_list_url)
|
l = get_message_list(message_list_url)
|
||||||
if l['Root'] == None:
|
if l['Root'] == None or l['Root']['Message'] == None:
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
messages = l['Root']['Message']
|
||||||
|
if type(messages) is not list:
|
||||||
|
m = []
|
||||||
|
m.append(messages)
|
||||||
|
messages = m
|
||||||
|
|
||||||
for a in l['Root']['Message']:
|
for a in messages:
|
||||||
|
|
||||||
# format the information regarding the message
|
# format the information regarding the message
|
||||||
msg_info = a['Date'] + " - " + a['Number']
|
msg_info = a['Date'] + " - " + a['Number']
|
||||||
|
@ -139,5 +145,3 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue