summaryrefslogtreecommitdiff
path: root/grc/src/platforms
diff options
context:
space:
mode:
authorjblum2008-09-17 03:11:44 +0000
committerjblum2008-09-17 03:11:44 +0000
commita91336462fa381e6744240580c545b01537ddbec (patch)
treefb99adfaec09ca7d6418c8ad32fb53f7e3066809 /grc/src/platforms
parente902750cc04f1d02d589b8237a181bed4c8f626c (diff)
downloadgnuradio-a91336462fa381e6744240580c545b01537ddbec.tar.gz
gnuradio-a91336462fa381e6744240580c545b01537ddbec.tar.bz2
gnuradio-a91336462fa381e6744240580c545b01537ddbec.zip
error message formatting
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9595 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms')
-rw-r--r--grc/src/platforms/base/Block.py4
-rw-r--r--grc/src/platforms/base/Connection.py8
-rw-r--r--grc/src/platforms/base/Port.py2
-rw-r--r--grc/src/platforms/python/Constants.py.in2
4 files changed, 11 insertions, 5 deletions
diff --git a/grc/src/platforms/base/Block.py b/grc/src/platforms/base/Block.py
index e3ef84d94..cb350b7cb 100644
--- a/grc/src/platforms/base/Block.py
+++ b/grc/src/platforms/base/Block.py
@@ -146,11 +146,11 @@ class Block(Element):
All checks must evaluate to true.
"""
if not self.get_enabled(): return
- for c in self.get_params() + self.get_sinks() + self.get_sources():
+ for c in self.get_params() + self.get_sinks() + self.get_sources() + self.get_connections():
try: assert(c.is_valid())
except AssertionError:
for msg in c.get_error_messages():
- self._add_error_message('%s: %s'%(c, msg))
+ self._add_error_message('>>> %s:\n\t%s'%(c, msg))
def __str__(self): return 'Block - %s - %s(%s)'%(self.get_id(), self.get_name(), self.get_key())
diff --git a/grc/src/platforms/base/Connection.py b/grc/src/platforms/base/Connection.py
index 3c0b42d78..954d4866a 100644
--- a/grc/src/platforms/base/Connection.py
+++ b/grc/src/platforms/base/Connection.py
@@ -44,7 +44,13 @@ class Connection(Element):
self._source = source
self._sink = sink
- def __str__(self): return 'Connection (%s -> %s)'%(self.get_source(), self.get_sink())
+ def __str__(self):
+ return 'Connection (\n\t%s\n\t\t%s\n\t%s\n\t\t%s\n)'%(
+ self.get_source().get_parent(),
+ self.get_source(),
+ self.get_sink().get_parent(),
+ self.get_sink(),
+ )
def is_connection(self): return True
diff --git a/grc/src/platforms/base/Port.py b/grc/src/platforms/base/Port.py
index 61134791c..672b2e4db 100644
--- a/grc/src/platforms/base/Port.py
+++ b/grc/src/platforms/base/Port.py
@@ -48,7 +48,7 @@ class Port(Element):
The port must be non-empty and type must a possible type.
"""
try: assert(not self.is_empty())
- except AssertionError: self._add_error_message('is empty.')
+ except AssertionError: self._add_error_message('Port is not connected.')
try: assert(self.get_type() in self.TYPES)
except AssertionError: self._add_error_message('Type "%s" is not a possible type.'%self.get_type())
diff --git a/grc/src/platforms/python/Constants.py.in b/grc/src/platforms/python/Constants.py.in
index 973304eba..199b24223 100644
--- a/grc/src/platforms/python/Constants.py.in
+++ b/grc/src/platforms/python/Constants.py.in
@@ -37,7 +37,7 @@ HIER_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP
FLOW_GRAPH_TEMPLATE = os.path.join(DATA_DIR, 'flow_graph.tmpl')
BLOCK_DTD = os.path.join(DATA_DIR, 'block.dtd')
BLOCK_TREE = os.path.join(DATA_DIR, 'block_tree.xml')
-DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc.xml')
+DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc')
#coloring
COMPLEX_COLOR_SPEC = '#3399FF'