[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/03: runtime: fix default forecast implem
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/03: runtime: fix default forecast implementation for python blocks |
Date: |
Sun, 12 Jul 2015 16:36:39 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 76772e98ce627319238a2a74cb9c02f971877c98
Author: Sebastian Koslowski <address@hidden>
Date: Fri Jul 10 11:42:55 2015 +0200
runtime: fix default forecast implementation for python blocks
---
gnuradio-runtime/python/gnuradio/gr/gateway.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/gnuradio-runtime/python/gnuradio/gr/gateway.py
b/gnuradio-runtime/python/gnuradio/gr/gateway.py
index 4ff0c4f..2a27b8a 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gateway.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gateway.py
@@ -177,9 +177,8 @@ class gateway_block(object):
forecast is only called from a general block
this is the default implementation
"""
- for ninput_item in ninput_items_required:
- ninput_item = noutput_items + self.history() - 1;
- return
+ for i in range(len(ninput_items_required)):
+ ninput_items_required[i] = noutput_items + self.history() - 1
def general_work(self, *args, **kwargs):
"""general work to be overloaded in a derived class"""
@@ -189,8 +188,11 @@ class gateway_block(object):
"""work to be overloaded in a derived class"""
raise NotImplementedError("work not implemented")
- def start(self): return True
- def stop(self): return True
+ def start(self):
+ return True
+
+ def stop(self):
+ return True
def set_msg_handler(self, which_port, handler_func):
handler = msg_handler()