diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-21 20:28:21 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-21 20:28:21 -0700 |
commit | 23cf7e35bf9aa1cffc9d1bb2f20d362b57110723 (patch) | |
tree | 70575a70f1c3f9431ad00ee5b7b886f01ef1b7ac /cloudinit/config/cc_update_etc_hosts.py | |
parent | a588b9b966e51c9b9778b0082c8c5b6ab10f2677 (diff) | |
download | vyos-cloud-init-23cf7e35bf9aa1cffc9d1bb2f20d362b57110723.tar.gz vyos-cloud-init-23cf7e35bf9aa1cffc9d1bb2f20d362b57110723.zip |
Use RuntimeError subclass instead of top level Exception
Diffstat (limited to 'cloudinit/config/cc_update_etc_hosts.py')
-rw-r--r-- | cloudinit/config/cc_update_etc_hosts.py | 4 |
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, |