Commit ac7821ab authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Prevent append and extend in ParameterList.

parent ca7fd66a
......@@ -379,6 +379,7 @@ class AbstractIOFile(object):
self.component_nameid = None
self.parent_component_nameid = None
class IOFile(str):
def __new__(self, val="", component_nameid=None, parent_component_nameid=[], file_format="any"):
......@@ -856,6 +857,12 @@ class ParameterList(list, AbstractParameter):
elif default.__class__.__name__ == "list":
return list.__init__(self, default)
def append(self, item):
raise TypeError('A parameter is immutable.')
def extend(self, items):
raise TypeError('A parameter is immutable.')
class InputFileList(ParameterList, AbstractInputFile):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment