Changeset - e76b112c837e
[Not reviewed]
default
0 1 0
Drew Perttula - 20 years ago 2005-06-17 20:49:20
drewp@bigasterisk.com
fix empty-subexpr bug
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -131,6 +131,11 @@ class Subterm:
 
        make_attributes_from_args('submaster', 'subexpr')
 
    def scaled(self, t):
 
        subexpr_eval = self.subexpr.eval(t)
 
        # this stops an error that didn't used to happen. i think when
 
        # the expr is empty, subexpr_eval becomes None, so this zero
 
        # is ok
 
        if subexpr_eval is None:
 
            subexpr_eval = 0
 
        if isinstance(subexpr_eval, Submaster.Submaster):
 
            # if the expression returns a submaster, just return it
 
            return subexpr_eval
0 comments (0 inline, 0 general)