[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9440 - gnuradio/trunk/grc/src/grc_gnuradio
From: |
jblum |
Subject: |
[Commit-gnuradio] r9440 - gnuradio/trunk/grc/src/grc_gnuradio |
Date: |
Thu, 28 Aug 2008 13:29:43 -0600 (MDT) |
Author: jblum
Date: 2008-08-28 13:29:40 -0600 (Thu, 28 Aug 2008)
New Revision: 9440
Modified:
gnuradio/trunk/grc/src/grc_gnuradio/FlowGraph.py
gnuradio/trunk/grc/src/grc_gnuradio/Param.py
Log:
temp fix for to_code error
Modified: gnuradio/trunk/grc/src/grc_gnuradio/FlowGraph.py
===================================================================
--- gnuradio/trunk/grc/src/grc_gnuradio/FlowGraph.py 2008-08-28 18:56:14 UTC
(rev 9439)
+++ gnuradio/trunk/grc/src/grc_gnuradio/FlowGraph.py 2008-08-28 19:29:40 UTC
(rev 9440)
@@ -23,7 +23,6 @@
from grc.elements.FlowGraph import FlowGraph as _FlowGraph
from Block import Block
from Connection import Connection
-import traceback
class FlowGraph(_FlowGraph):
@@ -81,23 +80,21 @@
Exclude paramterized variables.
@return a sorted list of variable blocks in order of dependency
(indep -> dep)
"""
- try:
- variables = filter(lambda b: b.get_key() in (
- 'variable', 'variable_slider',
'variable_chooser', 'variable_text_box'
- ), self.get_enabled_blocks())
- #map var id to variable block
- id2var = dict([(var.get_id(), var) for var in
variables])
- #map var id to variable code
- #variable code is a concatenation of all param code
(without the id param)
- id2expr = dict([(var.get_id(),
- ' '.join([param.to_code() for param in
filter(lambda p: p.get_key() != 'id',var.get_params())])
- ) for var in variables])
- #sort according to dependency
- sorted_ids = expr_utils.sort_variables(id2expr)
- #create list of sorted variable blocks
- variables = [id2var[id] for id in sorted_ids]
- return variables
- except: traceback.print_exc()
+ variables = filter(lambda b: b.get_key() in (
+ 'variable', 'variable_slider', 'variable_chooser',
'variable_text_box'
+ ), self.get_enabled_blocks())
+ #map var id to variable block
+ id2var = dict([(var.get_id(), var) for var in variables])
+ #map var id to variable code
+ #variable code is a concatenation of all param code (without
the id param)
+ id2expr = dict([(var.get_id(),
+ ' '.join([param.to_code() for param in filter(lambda p:
p.get_key() != 'id', var.get_params())])
+ ) for var in variables])
+ #sort according to dependency
+ sorted_ids = expr_utils.sort_variables(id2expr)
+ #create list of sorted variable blocks
+ variables = [id2var[id] for id in sorted_ids]
+ return variables
def get_parameters(self):
"""!
Modified: gnuradio/trunk/grc/src/grc_gnuradio/Param.py
===================================================================
--- gnuradio/trunk/grc/src/grc_gnuradio/Param.py 2008-08-28 18:56:14 UTC
(rev 9439)
+++ gnuradio/trunk/grc/src/grc_gnuradio/Param.py 2008-08-28 19:29:40 UTC
(rev 9440)
@@ -227,7 +227,8 @@
"""
#run init tasks in evaluate
if not self._init:
- self.evaluate()
+ try: self.evaluate()
+ except: pass
self._init = True
v = self.get_value()
t = self.get_type()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9440 - gnuradio/trunk/grc/src/grc_gnuradio,
jblum <=