From a46fc7db2d403eae025a687a94e72a5a80a2171e Mon Sep 17 00:00:00 2001 From: Edison Su Date: Mon, 27 Feb 2012 15:38:32 -0800 Subject: [PATCH] bug 14034: add newline around configuration file. status 14034: resolved fixed. Reviewed-by: frank --- agent/conf/agent.properties | 4 +++- python/lib/cloudutils/configFileOps.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties index bff768f3f14..39355c9fb6a 100644 --- a/agent/conf/agent.properties +++ b/agent/conf/agent.properties @@ -30,4 +30,6 @@ zone=default #vm.migrate.speed set the vm migrate speed, by default, it's the speed of guest network #local.storage.path local storage path, by default, it's /var/lib/libvirt/images/ -#cmds.timeout the timeout for time-consuming operations, such create/copy snapshot \ No newline at end of file +#cmds.timeout the timeout for time-consuming operations, such create/copy snapshot + + diff --git a/python/lib/cloudutils/configFileOps.py b/python/lib/cloudutils/configFileOps.py index e001e200c56..dd0ecd69ee6 100644 --- a/python/lib/cloudutils/configFileOps.py +++ b/python/lib/cloudutils/configFileOps.py @@ -62,7 +62,7 @@ class configFileOps: match = re.match(matchString, line) if match is not None: if entry.op == "add" and entry.separator == "=": - newline = entry.name + "=" + entry.value + "\n" + newline = "\n" + entry.name + "=" + entry.value + "\n" entry.setState("set") newLines.append(newline) self.backups.append([line, newline])