summaryrefslogtreecommitdiff
path: root/grc/python
diff options
context:
space:
mode:
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