summaryrefslogtreecommitdiff
path: root/grc/python
diff options
context:
space:
mode:
authorJohnathan Corgan2009-09-09 17:38:27 -0700
committerJohnathan Corgan2009-09-09 17:38:27 -0700
commit7f3dc5c263a55d1a992d28d374fc7acc9ebe412b (patch)
tree61f23680cb4c3a8a83dbf947868e0340725856c3 /grc/python
parent3c8af34f675eadd64b5fc3f0065793f3b3ff47f0 (diff)
parentb8f69ad7ba49aa85239f6de611ddfd040344f66b (diff)
downloadgnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.tar.gz
gnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.tar.bz2
gnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.zip
Merge branch 'grc' of http://gnuradio.org/git/jblum into master
* 'grc' of http://gnuradio.org/git/jblum: use show signal to perform initial gui update Fixed the usrp and usrp2 probe scripts to work with the new gui param api. propsdialog tweaks more code cleanup for properties dialog Rework the params/properties dialog and param gui class: renamed params dialog to props dialog remove unused imports, copyright date update, tweak Created recursive create labels and shapes method for gui element. replaced dict[rot] storage of areas and lines with a single list for the current rotation standardized the Element inheritance __init__ usage in gui better error msg for empty statements Implement a recursive validation api in the base Element class.
Diffstat (limited to 'grc/python')
-rw-r--r--grc/python/FlowGraph.py1
-rw-r--r--grc/python/Param.py6
-rw-r--r--grc/python/Port.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/grc/python/FlowGraph.py b/grc/python/FlowGraph.py
index 6b2936c75..4dd18a81f 100644
--- a/grc/python/FlowGraph.py
+++ b/grc/python/FlowGraph.py
@@ -42,6 +42,7 @@ class FlowGraph(_FlowGraph, _GUIFlowGraph):
@param namespace_hash a unique hash for the namespace
@return the resultant object
"""
+ if not code: raise Exception, 'Cannot evaluate empty statement.'
my_hash = hash(code) ^ namespace_hash
#cache if does not exist
if not self._eval_cache.has_key(my_hash):
diff --git a/grc/python/Param.py b/grc/python/Param.py
index e61779136..387fab548 100644
--- a/grc/python/Param.py
+++ b/grc/python/Param.py
@@ -153,9 +153,9 @@ class Param(_Param, _GUIParam):
dt_str = dt_str[:max_len-3] + '...'
return dt_str
- def get_input_class(self):
- if self.get_type() in ('file_open', 'file_save'): return FileParam
- return _GUIParam.get_input_class(self)
+ def get_input(self, *args, **kwargs):
+ if self.get_type() in ('file_open', 'file_save'): return FileParam(self, *args, **kwargs)
+ return _GUIParam.get_input(self, *args, **kwargs)
def get_color(self):
"""
diff --git a/grc/python/Port.py b/grc/python/Port.py
index 33426d905..6965371df 100644
--- a/grc/python/Port.py
+++ b/grc/python/Port.py
@@ -45,7 +45,7 @@ def _get_source_from_virtual_source_port(vsp, traversed=[]):
lambda b: b.is_virtual_sink(),
vsp.get_parent().get_parent().get_enabled_blocks(),
),
- )[0].get_sink(vsp.get_key())
+ )[0].get_sinks()[0]
), traversed + [vsp],
)
except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp