diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | project/shoutboxapicommunicator.py | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -91,4 +91,5 @@ ENV/ # Vim swap files *.swp -.gitignore
\ No newline at end of file +.gitignore +\.idea/ diff --git a/project/shoutboxapicommunicator.py b/project/shoutboxapicommunicator.py index b9e57b6..6655fd3 100644 --- a/project/shoutboxapicommunicator.py +++ b/project/shoutboxapicommunicator.py @@ -46,7 +46,8 @@ class ShoutboxCommunicator(BaseCommunicator): if len(content) > 0: logging.info("Messages from shoutbox:") - for msg in content: + sorted_content = sorted(content, key=lambda k: k["id"]) + for msg in sorted_content: logging.info("{}: {}, id: {}".format(msg["user"], msg["text"], msg["id"])) id_dec = int(msg["id"], 16) |
