summaryrefslogtreecommitdiff
path: root/grc/core/Platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core/Platform.py')
-rw-r--r--grc/core/Platform.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/grc/core/Platform.py b/grc/core/Platform.py
index 696281380e..997631d2c1 100644
--- a/grc/core/Platform.py
+++ b/grc/core/Platform.py
@@ -33,7 +33,7 @@ from .generator import Generator
from .FlowGraph import FlowGraph
from .Connection import Connection
from .Block import Block, EPyBlock
-from .Port import Port
+from .Port import Port, PortClone
from .Param import Param
from .utils import extract_docs
@@ -318,6 +318,7 @@ class Platform(Element):
}
port_classes = {
None: Port, # default
+ 'clone': PortClone, # default
}
param_classes = {
None: Param, # default
@@ -333,9 +334,9 @@ class Platform(Element):
return cls(parent, key=key, **kwargs)
def get_new_param(self, parent, **kwargs):
- cls = self.param_classes[None]
+ cls = self.param_classes[kwargs.pop('cls_key', None)]
return cls(parent, **kwargs)
def get_new_port(self, parent, **kwargs):
- cls = self.port_classes[None]
- return cls(parent, **kwargs) \ No newline at end of file
+ cls = self.port_classes[kwargs.pop('cls_key', None)]
+ return cls(parent, **kwargs)