summaryrefslogtreecommitdiff
path: root/grc/python/Param.py
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2009-08-28 21:06:19 -0700
committerJosh Blum <josh@joshknows.com>2009-08-28 21:06:19 -0700
commitcb794a7c8703ea06a9bce110fc1041140f25e8e6 (patch)
treebdaa150aa726fbd6d3931e3b87ad438847fec042 /grc/python/Param.py
parent9ae19105d745ef2c7be8fbe3c2206a0a6ca6632b (diff)
made is_virtual_xxx a block level function, used by port and param classes
Diffstat (limited to 'grc/python/Param.py')
-rw-r--r--grc/python/Param.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/grc/python/Param.py b/grc/python/Param.py
index 49601f1687..2ca1d0ec00 100644
--- a/grc/python/Param.py
+++ b/grc/python/Param.py
@@ -322,15 +322,15 @@ class Param(_Param):
elif t == 'stream_id':
#get a list of all stream ids used in the virtual sinks
ids = [param.get_value() for param in filter(
- lambda p: p.get_parent().get_key() == 'virtual_sink',
+ lambda p: p.get_parent().is_virtual_sink(),
self.get_all_params(t),
)]
#check that the virtual sink's stream id is unique
- if self.get_parent().get_key() == 'virtual_sink':
+ if self.get_parent().is_virtual_sink():
try: assert ids.count(v) <= 1 #id should only appear once, or zero times if block is disabled
except: raise Exception, 'Stream ID "%s" is not unique.'%v
#check that the virtual source's steam id is found
- if self.get_parent().get_key() == 'virtual_source':
+ if self.get_parent().is_virtual_source():
try: assert v in ids
except: raise Exception, 'Stream ID "%s" is not found.'%v
return v