From 646341eb3be8bcabb9c5f07cb9072105db5666a9 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Sat, 29 May 2010 12:42:04 -0400 Subject: [PATCH] Fixed invalidating conditions and chained condition parsing --- t/moe/conf.py | 2 +- t/moe/confparser.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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() -- 2.39.5