diff -r dddee537e4d5 -r 734eb79680e9 rset.py --- a/rset.py Thu Jul 09 14:58:19 2009 +0200 +++ b/rset.py Thu Jul 09 14:58:55 2009 +0200 @@ -537,10 +537,12 @@ for i, term in enumerate(rqlst.selection): if i == index: continue - try: - # XXX rewritten const - var = term.variable - except AttributeError: + # XXX rewritten const + # use iget_nodes for (hack) case where we have things like MAX(V) + for vref in term.iget_nodes(nodes.VariableRef): + var = vref.variable + break + else: continue #varname = var.name for ref in var.references():