Changeset 9440

Show
Ignore:
Timestamp:
08/28/08 13:29:40
Author:
jblum
Message:

temp fix for to_code error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/grc/src/grc_gnuradio/FlowGraph.py

    r9439 r9440  
    2424from Block import Block 
    2525from Connection import Connection 
    26 import traceback 
    2726 
    2827class FlowGraph(_FlowGraph): 
     
    8281                @return a sorted list of variable blocks in order of dependency (indep -> dep) 
    8382                """ 
    84                 try: 
    85                         variables = filter(lambda b: b.get_key() in ( 
    86                                 'variable', 'variable_slider', 'variable_chooser', 'variable_text_box' 
    87                         ), self.get_enabled_blocks()) 
    88                         #map var id to variable block 
    89                         id2var = dict([(var.get_id(), var) for var in variables]) 
    90                         #map var id to variable code 
    91                         #variable code is a concatenation of all param code (without the id param) 
    92                         id2expr = dict([(var.get_id(),  
    93                                 ' '.join([param.to_code() for param in filter(lambda p: p.get_key() != 'id',var.get_params())]) 
    94                         ) for var in variables]) 
    95                         #sort according to dependency 
    96                         sorted_ids = expr_utils.sort_variables(id2expr) 
    97                         #create list of sorted variable blocks 
    98                         variables = [id2var[id] for id in sorted_ids] 
    99                         return variables 
    100                 except: traceback.print_exc() 
     83                variables = filter(lambda b: b.get_key() in ( 
     84                        'variable', 'variable_slider', 'variable_chooser', 'variable_text_box' 
     85                ), self.get_enabled_blocks()) 
     86                #map var id to variable block 
     87                id2var = dict([(var.get_id(), var) for var in variables]) 
     88                #map var id to variable code 
     89                #variable code is a concatenation of all param code (without the id param) 
     90                id2expr = dict([(var.get_id(),  
     91                        ' '.join([param.to_code() for param in filter(lambda p: p.get_key() != 'id', var.get_params())]) 
     92                ) for var in variables]) 
     93                #sort according to dependency 
     94                sorted_ids = expr_utils.sort_variables(id2expr) 
     95                #create list of sorted variable blocks 
     96                variables = [id2var[id] for id in sorted_ids] 
     97                return variables 
    10198 
    10299        def get_parameters(self): 
  • gnuradio/trunk/grc/src/grc_gnuradio/Param.py

    r9379 r9440  
    228228                #run init tasks in evaluate 
    229229                if not self._init: 
    230                         self.evaluate() 
     230                        try: self.evaluate() 
     231                        except: pass 
    231232                        self._init = True 
    232233                v = self.get_value()