build/generic_platform/ConstraintManager: Add prepend parameter to add_extension.
In some cases, prepend is useful when we want to replace existing IOs.
This commit is contained in:
parent
d3ea912339
commit
253d1cfb9b
|
@ -205,8 +205,11 @@ class ConstraintManager:
|
||||||
self.platform_commands = []
|
self.platform_commands = []
|
||||||
self.connector_manager = ConnectorManager(connectors)
|
self.connector_manager = ConnectorManager(connectors)
|
||||||
|
|
||||||
def add_extension(self, io):
|
def add_extension(self, io, prepend=False):
|
||||||
self.available.extend(io)
|
if prepend:
|
||||||
|
self.available = list(io) + self.available
|
||||||
|
else:
|
||||||
|
self.available.extend(io)
|
||||||
|
|
||||||
def add_connector(self, connectors):
|
def add_connector(self, connectors):
|
||||||
self.connector_manager.add_connector(connectors)
|
self.connector_manager.add_connector(connectors)
|
||||||
|
|
Loading…
Reference in New Issue