From c27bb28fb23fcd463aa1acad7342e223073744d9 Mon Sep 17 00:00:00 2001 From: Gaurav Narula Date: Sat, 19 Mar 2016 01:17:57 +0530 Subject: [PATCH] mpris: handle an edge case in GetAll method 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 --- gnomemusic/mpris.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py index c4dc859e6..0e38ec928 100644 --- a/gnomemusic/mpris.py +++ b/gnomemusic/mpris.py @@ -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',