From 2f9fd2c61a18661adb007d46f1f83ac12154f406 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 22 Jan 2008 18:19:42 -0500 Subject: Keep leading newline from appearing in template files. --- cobbler/action_sync.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cobbler') diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index b61f525..b889f52 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -639,6 +639,10 @@ class BootSync: for x in metadata: if type(metadata[x]) == str: data_out = data_out.replace("@@%s@@" % x, metadata[x]) + + # remove leading newlines which apparently breaks AutoYAST ? + if data_out.startswith("\n"): + data_out = data_out.strip() if out_path is not None: self.mkdir(os.path.dirname(out_path)) -- cgit