# HG changeset patch # User Sylvain Thénault <sylvain.thenault@logilab.fr> # Date 1267701090 -3600 # Thu Mar 04 12:11:30 2010 +0100 # Branch stable # Node ID 9c06e009010b9983dcff3758c92b5cc01c80dc3a # Parent c0461bf2bf2482f0351bda751534e035c077b909 when uid_func_mapping specified using argument, reset it afterward diff --git a/analyze.py b/analyze.py --- a/analyze.py +++ b/analyze.py @@ -368,12 +368,15 @@ def visit(self, node, uid_func_mapping=None, kwargs=None, debug=False): # FIXME: not thread safe self.debug = debug - if uid_func_mapping: + if uid_func_mapping is not None: assert len(uid_func_mapping) <= 1 self.uid_func_mapping = uid_func_mapping self.uid_func = uid_func_mapping.values()[0] self.kwargs = kwargs self._visit(node) + if uid_func_mapping is not None: + self.uid_func_mapping = None + self.uid_func = None def visit_union(self, node): for select in node.children: