From c0324b1d684d5db342c9c59201105952acf364f9 Mon Sep 17 00:00:00 2001 From: David Halter Date: Fri, 24 Aug 2012 16:10:29 +0200 Subject: [PATCH] fixed a recursion problem with InstanceElements --- evaluate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evaluate.py b/evaluate.py index 3916c765..7071891a 100644 --- a/evaluate.py +++ b/evaluate.py @@ -270,7 +270,10 @@ class InstanceElement(object): def get_parent_until(self, *classes): scope = self.var.get_parent_until(*classes) - return InstanceElement(self.instance, scope) + if isinstance(scope, parsing.Module): + return scope + else: + return InstanceElement(self.instance, scope) def get_decorated_func(self): """ Needed because the InstanceElement should not be stripped """