Mercurial > code > home > repos > light9
changeset 900:aaf1f1825009
error if we have multiple expressions on one subterm
Ignore-this: f2f7f687ce0cf1f01df300a523f78243
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sun, 09 Jun 2013 09:43:35 +0000 |
parents | 21974e0ef0c4 |
children | 0dacbba70d06 |
files | light9/curvecalc/subterm.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/curvecalc/subterm.py Sun Jun 09 09:43:22 2013 +0000 +++ b/light9/curvecalc/subterm.py Sun Jun 09 09:43:35 2013 +0000 @@ -113,7 +113,10 @@ """current graph is being passed as an optimization. It should be equivalent to use self.graph in here.""" - expr = current.value(self.uri, L9['expression']) + objs = list(current.objects(self.uri, L9.expression)) + if len(objs) > 1: + raise ValueError("found multiple expressions for %s: %s" % + (self.uri, objs)) expr = current.value(self.uri, L9['expression']) if not expr: