From 961b1a53ade1d502cfb8fbe393abba4556008d18 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 31 Aug 2010 10:24:58 -0400 Subject: get '##' comment lines through to /etc/apt/sources.list (LP: #627439) LP: #627439 --- cloudinit/UserDataHandler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cloudinit/UserDataHandler.py') diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index ab7d0bc8..cbea7469 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -46,7 +46,9 @@ def do_include(str,parts): for line in str.splitlines(): if line == "#include": continue if line.startswith("#"): continue - content = urllib.urlopen(line).read() + try: + content = urllib.urlopen(line).read() + except Exception e: process_includes(email.message_from_string(decomp_str(content)),parts) def process_includes(msg,parts): -- cgit v1.2.3