diff options
author | Josh Blum | 2011-04-14 10:05:33 -0700 |
---|---|---|
committer | Josh Blum | 2011-04-14 10:05:33 -0700 |
commit | 4cdd41c1046cef12601602bd38dc8ebf42d1550d (patch) | |
tree | ec1fb606bfaa6ffe79d677c3bd4a5fa64c18f7bf /grc/python/expr_utils.py | |
parent | 8fb43aa9093fbbb5c9d8b9418c144dbf33730127 (diff) | |
download | gnuradio-4cdd41c1046cef12601602bd38dc8ebf42d1550d.tar.gz gnuradio-4cdd41c1046cef12601602bd38dc8ebf42d1550d.tar.bz2 gnuradio-4cdd41c1046cef12601602bd38dc8ebf42d1550d.zip |
grc: replaced asserts in python subdirectory
Diffstat (limited to 'grc/python/expr_utils.py')
-rw-r--r-- | grc/python/expr_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grc/python/expr_utils.py b/grc/python/expr_utils.py index 3c39f5d89..a2e56eedf 100644 --- a/grc/python/expr_utils.py +++ b/grc/python/expr_utils.py @@ -1,5 +1,5 @@ """ -Copyright 2008, 2009 Free Software Foundation, Inc. +Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -118,7 +118,7 @@ def sort_variables(exprs): Get a list of variables in order of dependencies. @param exprs a mapping of variable name to expression @return a list of variable names - @throws AssertionError circular dependencies + @throws Exception circular dependencies """ var_graph = get_graph(exprs) sorted_vars = list() @@ -126,7 +126,7 @@ def sort_variables(exprs): while var_graph.get_nodes(): #get a list of nodes with no edges indep_vars = filter(lambda var: not var_graph.get_edges(var), var_graph.get_nodes()) - assert indep_vars + if not indep_vars: raise Exception('circular dependency caught in sort_variables') #add the indep vars to the end of the list sorted_vars.extend(sorted(indep_vars)) #remove each edge-less node from the graph |