diff sat/plugins/plugin_adhoc_dbus.py @ 3014:b6abf8af87db

plugin ad-hoc D-Bus: fixed warning when no media player is found
author Goffi <goffi@goffi.org>
date Fri, 19 Jul 2019 17:07:56 +0200
parents bba1c51bf2c6
children ab2696e34d29
line wrap: on
line diff
--- 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: