From fb2fb2ff30db6f1f06f15974a6f6be5c5ed518a6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 30 Jan 2012 09:24:41 -0500 Subject: support empty lines in '#include' files (LP: #923043) LP: #923043 --- ChangeLog | 1 + cloudinit/UserDataHandler.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index cc43aaad..bdba748e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ - fix pylint warnings [Juerg Haefliger] (LP: #914739) - add support for adding and deleting CA Certificates [Mike Milner] (LP: #915232) - in ci-info lines, use '.' to indicate empty field for easier machine reading + - support empty lines in "#include" files (LP: #923043) 0.6.2: - fix bug where update was not done unless update was explicitly set. It would not be run if 'upgrade' or packages were set to be installed diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index 93d1d36a..98729056 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -71,6 +71,8 @@ def do_include(content, appendmsg): line = line[len("#include"):].lstrip() if line.startswith("#"): continue + if line.strip() == "": + continue # urls cannot not have leading or trailing white space msum = hashlib.md5() # pylint: disable=E1101 -- cgit v1.2.3