summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-08-31 10:24:58 -0400
committerScott Moser <smoser@ubuntu.com>2010-08-31 10:24:58 -0400
commit961b1a53ade1d502cfb8fbe393abba4556008d18 (patch)
treec4e3fb59fce982fba101cefa22ef0984c9cae1f3 /cloudinit
parentf55324af9b35d3a35cd844022a46c27e8f4dbc49 (diff)
downloadvyos-cloud-init-961b1a53ade1d502cfb8fbe393abba4556008d18.tar.gz
vyos-cloud-init-961b1a53ade1d502cfb8fbe393abba4556008d18.zip
get '##' comment lines through to /etc/apt/sources.list (LP: #627439)
LP: #627439
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/UserDataHandler.py4
1 files changed, 3 insertions, 1 deletions
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):