Replaced TYPES in Port and Param with types parameter.
[debian/gnuradio] / grc / python / Port.py
index d6c622c461243cc7ad8df0abe80e9ea6824c35f2..3214d937a503721e2e4765342bb0679a6b8cf827 100644 (file)
@@ -49,12 +49,12 @@ def _get_source_from_virtual_source_port(vsp, traversed=[]):
        )
        except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp
 
-class Port(_Port):
+##possible port types
+TYPES = ['complex', 'float', 'int', 'short', 'byte', 'msg', '']
 
-       ##possible port types
-       TYPES = ['complex', 'float', 'int', 'short', 'byte', 'msg']
+class Port(_Port):
 
-       def __init__(self, block, n, dir):
+       def __init__(self, block, n, dir, **kwargs):
                """
                Make a new port from nested data.
                @param block the parent element
@@ -75,6 +75,7 @@ class Port(_Port):
                        block=block,
                        n=n,
                        dir=dir,
+                       types=TYPES,
                )
                self._nports = n.find('nports') or ''
                self._vlen = n.find('vlen') or ''