[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
- [Commit-gnuradio] [gnuradio] branch master updated (432e3b7 -> 5974a3e), git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 04/46: zeromq: first cut at compiling lib/ directory, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 17/46: wip, renaming and implementing rep_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 11/46: zeromq: Rename "zmqblocks" to zeromq in examples, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 14/46: zeromq: renamed source_pushpull to pull_source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 15/46: zeromq: renamed sink_pubsub to pub_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 09/46: Fix callback function to work with multiple arguments and return None in case of error.,
git <=
- [Commit-gnuradio] [gnuradio] 06/46: zeromq: converted SWIG to in-tree build, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 18/46: Add vlen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 16/46: zeromq: removed feedback source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 03/46: zeromq: Initial conversion of include/gnuradio/zeromq files, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 19/46: zeromq: renamed source_reqrep to req_source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 20/46: zeromq: remove nopoll req/rep blocks, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 21/46: zeromq: cleanup copyright, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 13/46: zeromq: renamed sink_pushpull push_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 08/46: Fix ZeroMQ cmake module., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 10/46: zeromq: Fix typo in CMakeLists to link against libzmq, git, 2014/05/16