From 9af87367eb549b37fe37c42b0f64ad1fefbff519 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Jun 2012 22:40:26 +0200 Subject: [PATCH] flow/network: require ActorNode be passed to add_connection --- migen/flow/network.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/migen/flow/network.py b/migen/flow/network.py index 25d55d1b..e33f04e9 100644 --- a/migen/flow/network.py +++ b/migen/flow/network.py @@ -53,10 +53,8 @@ class DataFlowGraph(MultiDiGraph): def add_connection(self, source_node, sink_node, source_ep=None, sink_ep=None, # default: assume nodes have 1 source/sink and use that one source_subr=None, sink_subr=None): # default: use whole record - if not isinstance(source_node, ActorNode): - source_node = ActorNode(source_node) - if not isinstance(sink_node, ActorNode): - sink_node = ActorNode(sink_node) + assert(isinstance(source_node, ActorNode)) + assert(isinstance(sink_node, ActorNode)) self.add_edge(source_node, sink_node, source=source_ep, sink=sink_ep, source_subr=source_subr, sink_subr=sink_subr) -- 2.30.2