From: Martin Mares Date: Fri, 14 Aug 2009 09:01:25 +0000 (+0200) Subject: Make "+=" insert spaces as necessary X-Git-Tag: python-dummy-working~68 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9c6ad2fa70d2806839fafeeaaa720520a9aa520e;p=moe.git Make "+=" insert spaces as necessary --- 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: