summaryrefslogtreecommitdiff
path: root/gr-blocks/python
diff options
context:
space:
mode:
authormormj <34754695+mormj@users.noreply.github.com>2021-09-29 11:03:09 -0400
committerGitHub <noreply@github.com>2021-09-29 11:03:09 -0400
commit65366505b3d04422cb9ec93414e1c8e474f5aa08 (patch)
tree3cbf83e515f109b1cf73bbbea871efe1e37bf094 /gr-blocks/python
parentaf3fbe432fe16efb05f26c24a0fa9724680dc8dd (diff)
runtime: fix pybind of get_tags_in_window
* runtime: fix pybind of get_tags_in_window Fix issue where get_tags_in_window was bound to and consequently had the same behavior as get_tags_in_range Fixes #5005 Test recommended by ryanvolz fails to validate tag offset not just when nitems_read is 0 Signed-off-by: Josh Morman <jmorman@peratonlabs.com>
Diffstat (limited to 'gr-blocks/python')
-rw-r--r--gr-blocks/python/blocks/qa_block_gateway.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gr-blocks/python/blocks/qa_block_gateway.py b/gr-blocks/python/blocks/qa_block_gateway.py
index 2f8071dfdd..8088b59a85 100644
--- a/gr-blocks/python/blocks/qa_block_gateway.py
+++ b/gr-blocks/python/blocks/qa_block_gateway.py
@@ -122,7 +122,10 @@ class tag_source(gr.sync_block):
num_output_items = len(output_items[0])
# put code here to fill the output items...
-
+ if self.nitems_written(0) == 0:
+ # skip tagging in the first work block
+ return num_output_items
+
# make a new tag on the middle element every time work is called
count = self.nitems_written(0) + num_output_items // 2
key = pmt.string_to_symbol("example_key")