From: Tomas Gavenciak Date: Sat, 29 May 2010 16:42:04 +0000 (-0400) Subject: Fixed invalidating conditions and chained condition parsing X-Git-Tag: python-dummy-working~51 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=646341eb3be8bcabb9c5f07cb9072105db5666a9;p=moe.git Fixed invalidating conditions and chained condition parsing --- diff --git a/t/moe/conf.py b/t/moe/conf.py index 9d697af..3f145c8 100644 --- a/t/moe/conf.py +++ b/t/moe/conf.py @@ -95,7 +95,7 @@ class ConfigElem(object): """ check_depth(depth) if self.cached: - log.debug('invalidating %r', self.name) + log.debug('invalidating %s', self) self.cached = False for d in self.dependants: d.invalidate(depth + 1) diff --git a/t/moe/confparser.py b/t/moe/confparser.py index de4a515..e6ff566 100644 --- a/t/moe/confparser.py +++ b/t/moe/confparser.py @@ -240,10 +240,11 @@ class ConfigParser(object): def p_CONDITION(self): self.dbg() # Debug self.p_WS() + t = u"condition at %s:%d:%d"%(self.fname, self.line, self.column) self.expect(self.c_if) self.p_WS() f = self.p_FORMULA() - cnd = conf.ConfigCondition(f) + cnd = conf.ConfigCondition(f, text=t, parent=(self.conditions and self.conditions[-1]) or None) self.conditions.append(cnd) # Parse a block self.p_WS()