aboutsummaryrefslogtreecommitdiffstats
path: root/project/shoutboxapicommunicator.py
diff options
context:
space:
mode:
Diffstat (limited to 'project/shoutboxapicommunicator.py')
-rw-r--r--project/shoutboxapicommunicator.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/project/shoutboxapicommunicator.py b/project/shoutboxapicommunicator.py
index 7194c8f..4c7e0c0 100644
--- a/project/shoutboxapicommunicator.py
+++ b/project/shoutboxapicommunicator.py
@@ -24,9 +24,11 @@ class ShoutboxCommunicator(BaseCommunicator):
return
content = json.loads(r.text)
- logging.info("Messages:")
- for msg in content:
- logging.info("{}: {}".format(msg["user"], msg["text"]))
+
+ if len(content) > 0:
+ logging.info("Messages from shoutbox:")
+ for msg in content:
+ logging.info("{}: {}".format(msg["user"], msg["text"]))
return content