summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-19 18:49:40 +0000
committerScott Moser <smoser@ubuntu.com>2011-01-19 18:49:40 +0000
commit9f4a828037e76ab6636f79a30eaa56fc6fddef52 (patch)
tree93bbccb68cd386bdea71e05b532d440916ec0dd6
parentee03480e670c10d48a4825a458fac18aaf4fbec0 (diff)
downloadvyos-cloud-init-9f4a828037e76ab6636f79a30eaa56fc6fddef52.tar.gz
vyos-cloud-init-9f4a828037e76ab6636f79a30eaa56fc6fddef52.zip
cloud-init.py: log exception on failure to set hostname
-rwxr-xr-xcloud-init.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloud-init.py b/cloud-init.py
index 1278d2eb..bda1ef8f 100755
--- a/cloud-init.py
+++ b/cloud-init.py
@@ -108,7 +108,8 @@ def main():
set_hostname, [ hostname, log ], False)
cloud.sem_and_run("update_hostname", "always",
update_hostname, [ hostname, log ], False)
- except:
+ except Exception, e:
+ util.logexc(log)
warn("failed to set hostname\n")
#print "user data is:" + cloud.get_user_data()