[gnome-music] mpris: Always wrap return value in a tuple
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] mpris: Always wrap return value in a tuple
- Date: Tue, 26 Apr 2016 13:43:43 +0000 (UTC)
commit 03831f9079be2f227f007c91a7dd0ff79d850515
Author: Gaurav Narula <gnarula94 gmail com>
Date: Tue Apr 26 18:50:32 2016 +0530
mpris: Always wrap return value in a tuple
https://bugzilla.gnome.org/show_bug.cgi?id=765603
gnomemusic/mpris.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 0e38ec9..eb4691a 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -72,10 +72,9 @@ class Server:
result = getattr(self, method_name)(*args)
- if type(result) is list:
- result = tuple(result)
- elif not type(result) is tuple:
- result = (result,)
+ # out_args is atleast (signature1). We therefore always wrap the result
+ # as a tuple. Refer to https://bugzilla.gnome.org/show_bug.cgi?id=765603
+ result = (result,)
out_args = self.method_outargs[method_name]
if out_args != '()':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]