From 74724513e65f9c037b2c266bd01c806f7aafc88c Mon Sep 17 00:00:00 2001 From: Necoro <> Date: Wed, 21 Nov 2007 14:01:42 +0000 Subject: r561@Devoty: necoro | 2007-11-20 09:29:35 +0100 Improved session support --- portato/config_parser.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'portato/config_parser.py') diff --git a/portato/config_parser.py b/portato/config_parser.py index eb0d42a..b2b47a6 100644 --- a/portato/config_parser.py +++ b/portato/config_parser.py @@ -366,6 +366,14 @@ class ConfigParser: part1 = self.cache[val.line][:self.pos[val.line][0]] # key+DELIMITER part2 = val.value # value part3 = self.cache[val.line][self.pos[val.line][1]:] # everything behind the vale (\n in normal cases) + + if not val.old: # empty original value + add = "" + if part1.endswith("\n"): + part1 = part1[:-1] + add = "\n" + part3 = part3 + add + self.cache[val.line] = part1 + part2 + part3 # write -- cgit v1.2.3