[sql generation] fix exists table scope pb: when iterating other solutions inner to an EXISTS subquery, we should reset variables which have this exists node as scope
try:rtype,=__args__exceptValueError:print'USAGE: cubicweb-ctl shell <instance> detect_cycle.py -- <relation type>'printgraph={}forfromeid,toeidinrql('Any X,Y WHERE X %s Y'%rtype):graph.setdefault(fromeid,[]).append(toeid)fromlogilab.common.graphimportget_cyclesforcycleinget_cycles(graph):print'cycle','->'.join(str(n)fornincycle)