comparison 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
comparison
equal deleted inserted replaced
3013:860c550028d6 3014:b6abf8af87db
344 try: 344 try:
345 result_elt = yield self._c.do(client, device_jid, 345 result_elt = yield self._c.do(client, device_jid,
346 NS_MEDIA_PLAYER, timeout=5) 346 NS_MEDIA_PLAYER, timeout=5)
347 command_elt = self._c.getCommandElt(result_elt) 347 command_elt = self._c.getCommandElt(result_elt)
348 form = data_form.findForm(command_elt, NS_MEDIA_PLAYER) 348 form = data_form.findForm(command_elt, NS_MEDIA_PLAYER)
349 if form is None:
350 continue
349 mp_options = form.fields['media_player'].options 351 mp_options = form.fields['media_player'].options
350 session_id = command_elt.getAttribute('sessionid') 352 session_id = command_elt.getAttribute('sessionid')
351 if mp_options and session_id: 353 if mp_options and session_id:
352 # we just want to discover player, so we cancel the 354 # we just want to discover player, so we cancel the
353 # session 355 # session