Commit 1e53583e authored by André's avatar André Committed by Philipp Hörist

MusicTrackListener: Catch all errors

Fixes #10164.
parent 221345f9
......@@ -85,10 +85,8 @@ class MusicTrackListener:
-1,
None)
except GLib.Error as error:
if error.domain == 'g-dbus-error-quark':
log.debug("Could not list names: %s", error.message)
return
raise
log.debug("Could not list names: %s", error.message)
return
for name in result[0]:
if name.startswith(MPRIS_PLAYER_PREFIX):
......@@ -199,12 +197,10 @@ class MusicTrackListener:
-1,
None)
except GLib.Error as error:
if error.domain == 'g-dbus-error-quark':
log.debug("Could not enable music listener: %s", error.message)
return None
raise
else:
return self._get_music_info(result[0])
log.debug("Could not enable music listener: %s", error.message)
return None
return self._get_music_info(result[0])
def enable():
......
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