From 2c83f5ce267267119e90c1ab552845edb500030c Mon Sep 17 00:00:00 2001 From: Ryan Volz <ryan.volz@gmail.com> Date: Wed, 13 Oct 2021 16:49:24 -0400 Subject: grc: Don't fail when type lookup fails by defaulting to an empty set. Signed-off-by: Ryan Volz <ryan.volz@gmail.com> --- grc/core/Connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grc/core/Connection.py') diff --git a/grc/core/Connection.py b/grc/core/Connection.py index f979efb3e4..e79ffe14e4 100644 --- a/grc/core/Connection.py +++ b/grc/core/Connection.py @@ -93,7 +93,9 @@ class Connection(Element): source_dtype = self.source_port.dtype sink_dtype = self.sink_port.dtype - if source_dtype != sink_dtype and source_dtype not in ALIASES_OF.get(sink_dtype): + if source_dtype != sink_dtype and source_dtype not in ALIASES_OF.get( + sink_dtype, default=set() + ): self.add_error_message('Source IO type "{}" does not match sink IO type "{}".'.format(source_dtype, sink_dtype)) source_size = self.source_port.item_size -- cgit v1.2.3