Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-12-29 23:54:34 +0300
committerlovetox <philipp@hoerist.com>2020-12-30 00:20:52 +0300
commit0fe3b7dd7f23d9440fa924be7cdb9c091cb688a9 (patch)
treed69997d9a6efbb3b5a14517315551f9034630340
parentbd0b2cd32030e23b6902dadadc65cd2b744a980a (diff)
Tune: Bail out if there is no artist or titlenbxmpp-2.0.0
-rw-r--r--nbxmpp/modules/tune.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nbxmpp/modules/tune.py b/nbxmpp/modules/tune.py
index e054e3a..5eb0b07 100644
--- a/nbxmpp/modules/tune.py
+++ b/nbxmpp/modules/tune.py
@@ -64,6 +64,11 @@ class Tune(BaseModule):
tune_dict[attr] = tune_node.getTagData(attr)
data = TuneData(**tune_dict)
+ if data.artist is None and data.title is None:
+ self._log.warning('Missing artist or title: %s %s',
+ data, properties.jid)
+ return
+
pubsub_event = properties.pubsub_event._replace(data=data)
self._log.info('Received tune: %s - %s', properties.jid, data)