From: smbaker Date: Mon, 14 Jan 2013 21:02:48 +0000 (-0800) Subject: prevent extra newlines when hosts changes X-Git-Tag: nodemanager-2.1-19~2 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=e95344dbfcbe31fbe1cb489d484e37c464950004 prevent extra newlines when hosts changes --- diff --git a/plugins/hostmap.py b/plugins/hostmap.py index 3d030e6..ccbea4b 100644 --- a/plugins/hostmap.py +++ b/plugins/hostmap.py @@ -71,7 +71,7 @@ def GetSlivers(data, config=None, plc=None): # remove anything between PREFIX and SUFFIX from contents - pattern = PREFIX + ".*" + SUFFIX + pattern = PREFIX + ".*" + SUFFIX + "\n" regex = re.compile(pattern, re.DOTALL) if regex.search(contents) != None: contents = regex.sub(hostmap, contents)