Mercurial > code > home > repos > light9
changeset 283:e76b112c837e
fix empty-subexpr bug
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Fri, 17 Jun 2005 20:49:20 +0000 |
parents | d482699decbd |
children | 304a918e7488 |
files | bin/curvecalc |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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