summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_update_etc_hosts.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_update_etc_hosts.py')
-rw-r--r--cloudinit/config/cc_update_etc_hosts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/config/cc_update_etc_hosts.py b/cloudinit/config/cc_update_etc_hosts.py
index 6820ac4f..c148b12e 100644
--- a/cloudinit/config/cc_update_etc_hosts.py
+++ b/cloudinit/config/cc_update_etc_hosts.py
@@ -39,8 +39,8 @@ def handle(name, cfg, cloud, log, _args):
distro_n = cloud.distro.name
tpl_fn_name = cloud.get_template_filename("hosts.%s" % (distro_n))
if not tpl_fn_name:
- raise Exception(("No hosts template could be"
- " found for distro %s") % (distro_n))
+ raise RuntimeError(("No hosts template could be"
+ " found for distro %s") % (distro_n))
out_fn = cloud.paths.join(False, '/etc/hosts')
templater.render_to_file(tpl_fn_name, out_fn,