summaryrefslogtreecommitdiff
path: root/cloudinit/UserDataHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/UserDataHandler.py')
-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):