[rql rewrite] equivalent but much simpler flow stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 24 Jul 2013 16:49:40 +0200
branchstable
changeset 9187 8406bef5d5f2
parent 9184 b982e88e4836
child 9188 0677e03077fb
[rql rewrite] equivalent but much simpler flow
rqlrewrite.py
--- a/rqlrewrite.py	Thu Jul 25 08:52:15 2013 +0200
+++ b/rqlrewrite.py	Wed Jul 24 16:49:40 2013 +0200
@@ -685,10 +685,8 @@
             if _has_multiple_cardinality(vi['stinfo']['possibletypes'], rdef,
                                          ttypes_func, cardindex):
                 continue
-            break
-        else:
-            return None
-        return orel
+            return orel
+        return None
 
     def _use_orig_term(self, snippet_varname, term):
         key = (self.current_expr, self.varmap, snippet_varname)