# HG changeset patch # User Drew Perttula # Date 1119041360 0 # Node ID e76b112c837ef19f883d5f538d415ef28a8d260d # Parent d482699decbd1791444d348e3edfe9d882314be3 fix empty-subexpr bug diff -r d482699decbd -r e76b112c837e bin/curvecalc --- a/bin/curvecalc Fri Jun 17 20:36:29 2005 +0000 +++ b/bin/curvecalc Fri Jun 17 20:49:20 2005 +0000 @@ -131,6 +131,11 @@ 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