From 9c6ad2fa70d2806839fafeeaaa720520a9aa520e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 14 Aug 2009 11:01:25 +0200 Subject: [PATCH] Make "+=" insert spaces as necessary --- t/moe/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/moe/config.py b/t/moe/config.py index 4b411d8..a96fdb6 100644 --- a/t/moe/config.py +++ b/t/moe/config.py @@ -46,6 +46,8 @@ class MoeConfig: k = k[:-1] if not self.vars.has_key(k): self.vars[k] = [("a","")]; + else: + self.vars[k] += [("s"," ")] else: self.vars[k] = [] if not key_pattern.match(k): @@ -145,6 +147,8 @@ class MoeConfigStack: new = cfg.vars[k] if len(new) > 0 and new[0][0] == "a": v = self.do_get(k, pos-1) + if v != "" and not v.endswith(" "): + v += " " else: v = "" for op,arg in new: -- 2.39.5