aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--project/shoutboxapicommunicator.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index bd41bb7..542476a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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)