Skip to content

Commit

Permalink
mpris: handle an edge case in GetAll method
Browse files Browse the repository at this point in the history
Some clients invoke the GetAll method of org.freedesktop.DBus.Properties interface
with the Properties and Introspectable interface as arguments which do not have
any properties. This patch returns an empty dictionary for this scenario rather
than raising an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=705069
  • Loading branch information
gnarula authored and felipeborges committed Apr 4, 2016
1 parent 8358b43 commit c27bb28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gnomemusic/mpris.py
Expand Up @@ -722,6 +722,10 @@ def GetAll(self, interface_name):
'Orderings': GLib.Variant('as', ['Alphabetical']),
'ActivePlaylist': GLib.Variant('(b(oss))', self._get_active_playlist()),
}
elif interface_name == 'org.freedesktop.DBus.Properties':
return {}
elif interface_name == 'org.freedesktop.DBus.Introspectable':
return {}
else:
raise Exception(
'org.mpris.MediaPlayer2.GnomeMusic',
Expand Down

0 comments on commit c27bb28

Please sign in to comment.