commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 09/46: Fix callback function to work with m


From: git
Subject: [Commit-gnuradio] [gnuradio] 09/46: Fix callback function to work with multiple arguments and return None in case of error.
Date: Fri, 16 May 2014 19:37:13 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit fd02a15271a3e98bafc089a9879e4fe83b148af3
Author: Johannes Schmitz <address@hidden>
Date:   Mon Jan 20 19:15:00 2014 +0100

    Fix callback function to work with multiple arguments and return None
    in case of error.
---
 gr-zeromq/python/zeromq/rpc_manager.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gr-zeromq/python/zeromq/rpc_manager.py 
b/gr-zeromq/python/zeromq/rpc_manager.py
index e50a3d6..eb6fa86 100644
--- a/gr-zeromq/python/zeromq/rpc_manager.py
+++ b/gr-zeromq/python/zeromq/rpc_manager.py
@@ -93,9 +93,10 @@ class rpc_manager():
         if self.interfaces.has_key(id_str):
             callback_func = self.interfaces.get(id_str)
             if not args == None:
-                return(callback_func(args))
+                # use unpacking or splat operator * to unpack argument list
+                return(callback_func(*args))
             else:
                 return(callback_func())
         else:
             print "[RPC] ERROR: id_str not found"
-            return 0
+            return None



reply via email to

[Prev in Thread] Current Thread [Next in Thread]