diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-27 14:38:38 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-27 14:38:38 -0800 |
commit | 521729b2ccb483cbccf83fb23ffbdecbb68ad8df (patch) | |
tree | c767b47fb7d280828aa92ff4a3704a9ee0151e0d /grc/core/Block.py | |
parent | e28e7d0ddc46ebe2a70e67420f243b0f5eedb281 (diff) | |
parent | db1a0a96785577c20dd254e6825eac050cf4d59b (diff) |
Merge branch 'master' into next
Diffstat (limited to 'grc/core/Block.py')
-rw-r--r-- | grc/core/Block.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grc/core/Block.py b/grc/core/Block.py index de1d83ee9a..fba9371963 100644 --- a/grc/core/Block.py +++ b/grc/core/Block.py @@ -461,10 +461,11 @@ class Block(Element): iter_ports = iter(ports) ports_new = [] port_current = next(iter_ports, None) - for key, port_type in port_specs: + for key, port_type, vlen in port_specs: reuse_port = ( port_current is not None and port_current.get_type() == port_type and + port_current.get_vlen() == vlen and (key.isdigit() or port_current.get_key() == key) ) if reuse_port: @@ -475,6 +476,8 @@ class Block(Element): if port_type == 'message': n['name'] = key n['optional'] = '1' + if vlen > 1: + n['vlen'] = str(vlen) port = platform.Port(block=self, n=n, dir=direction) ports_new.append(port) # replace old port list with new one |