Commit b3573bfd authored by Jean Felder's avatar Jean Felder

mpris: Replace exceptions with logger messages

parent da7fa8df
......@@ -736,10 +736,8 @@ class MediaPlayer2Service(Server):
elif interface_name == 'org.freedesktop.DBus.Introspectable':
return {}
else:
raise Exception(
'org.mpris.MediaPlayer2.GnomeMusic',
'This object does not implement the %s interface'
% interface_name)
logger.warning(
"MPRIS does not implement {} interface".format(interface_name))
def Set(self, interface_name, property_name, new_value):
if interface_name == MediaPlayer2Service.MEDIA_PLAYER2_IFACE:
......@@ -761,10 +759,8 @@ class MediaPlayer2Service(Server):
else:
self.player.props.repeat_mode = RepeatMode.NONE
else:
raise Exception(
'org.mpris.MediaPlayer2.GnomeMusic',
'This object does not implement the %s interface'
% interface_name)
logger.warning(
"MPRIS does not implement {} interface".format(interface_name))
def PropertiesChanged(self, interface_name, changed_properties,
invalidated_properties):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment