# HG changeset patch # User Goffi # Date 1563548876 -7200 # Node ID b6abf8af87db5a4fecfe02dd6b10857a847078e4 # Parent 860c550028d639c4ecad236cb6e4dfab07485166 plugin ad-hoc D-Bus: fixed warning when no media player is found diff -r 860c550028d6 -r b6abf8af87db sat/memory/disco.py --- a/sat/memory/disco.py Thu Jul 18 21:58:34 2019 +0200 +++ b/sat/memory/disco.py Fri Jul 19 17:07:56 2019 +0200 @@ -313,7 +313,8 @@ """Return entities (including jid_ and its items) offering features @param features: iterable of features which must be present - @param identity(None, tuple(unicode, unicode)): if not None, accept only this (category/type) identity + @param identity(None, tuple(unicode, unicode)): if not None, accept only this + (category/type) identity @param jid_: the jid of the target server (None for profile's server) @param profile: %(doc_profile)s @return: a set of found entities diff -r 860c550028d6 -r b6abf8af87db sat/plugins/plugin_adhoc_dbus.py --- a/sat/plugins/plugin_adhoc_dbus.py Thu Jul 18 21:58:34 2019 +0200 +++ b/sat/plugins/plugin_adhoc_dbus.py Fri Jul 19 17:07:56 2019 +0200 @@ -346,6 +346,8 @@ NS_MEDIA_PLAYER, timeout=5) command_elt = self._c.getCommandElt(result_elt) form = data_form.findForm(command_elt, NS_MEDIA_PLAYER) + if form is None: + continue mp_options = form.fields['media_player'].options session_id = command_elt.getAttribute('sessionid') if mp_options and session_id: