[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/22: grc: don't fail for unknown domains
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/22: grc: don't fail for unknown domains |
Date: |
Tue, 23 Dec 2014 09:38:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 5fc2db030c7bc52d10ca06bae452ca5d0eb99591
Author: Sebastian Koslowski <address@hidden>
Date: Wed Dec 3 13:50:31 2014 +0100
grc: don't fail for unknown domains
---
grc/base/Connection.py | 7 +++++--
grc/base/Platform.py | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/grc/base/Connection.py b/grc/base/Connection.py
index dd74f2d..abe8b4f 100644
--- a/grc/base/Connection.py
+++ b/grc/base/Connection.py
@@ -86,8 +86,11 @@ class Connection(Element):
sink_domain = self.get_sink().get_domain()
if (source_domain, sink_domain) not in
platform.get_connection_templates():
self.add_error_message('No connection known for domains "%s",
"%s"' % (source_domain, sink_domain))
- multiple_sinks =
platform.get_domain(key=self.get_source().get_domain())['multiple_sinks']
- if not multiple_sinks and len(self.get_source().get_connections()) > 1:
+
+ if (source_domain in platform.get_domains() and
+ not platform.get_domain(key=source_domain)['multiple_sinks'] and
+ len(self.get_source().get_connections()) > 1
+ ):
self.add_error_message('Source domain "%s" can have only one
downstream block' % source_domain)
diff --git a/grc/base/Platform.py b/grc/base/Platform.py
index 91969b2..744b546 100644
--- a/grc/base/Platform.py
+++ b/grc/base/Platform.py
@@ -223,7 +223,7 @@ class Platform(_Element):
def get_new_block(self, flow_graph, key): return self.Block(flow_graph,
n=self._blocks_n[key])
def get_domains(self): return self._domains
- def get_domain(self, key): return self._domains[key]
+ def get_domain(self, key): return self._domains.get(key)
def get_connection_templates(self): return self._connection_templates
def get_name(self): return self._name
- [Commit-gnuradio] [gnuradio] 13/22: runtime: whitespace fixes, (continued)
- [Commit-gnuradio] [gnuradio] 13/22: runtime: whitespace fixes, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 15/22: runtime: add tests for new decorators in hier_block2, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 14/22: runtime: refactor top/hier block python wrappers, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 17/22: grc: fix connections error log and color, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 11/22: grc: PEP8 fixes in Generator, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 16/22: grc: add domain property color and use it for connections, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 06/22: grc: domain-specific port keys, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 09/22: grc: make Generator use gr_message domain, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 03/22: grc: draw ports with custom domain differently, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 22/22: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 04/22: grc: don't fail for unknown domains,
git <=
- [Commit-gnuradio] [gnuradio] 19/22: Merge branch 'port_domains' into master_grcwg, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 05/22: grc: use domain connection templates in Generator, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 21/22: Merge remote-tracking branch 'skoslowski/msg_connect_extended', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 18/22: grc: port domain code clean-up, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 20/22: Merge branch 'maint', git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 02/22: grc: add domain attribute to ports, git, 2014/12/23
- [Commit-gnuradio] [gnuradio] 01/22: grc: add domain xml DTD and parsing, git, 2014/12/23