diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-05-27 09:55:10 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-05-27 09:55:10 -0400 |
commit | 318bd66461cba2f480b2ef6be119d2fcd5c6e9c0 (patch) | |
tree | 1817b310efc0190c92c5c95b15df6491119233ce /cloudinit/sources/helpers/azure.py | |
parent | 949cebd48c9100d4fd00b74232bcf048980e6e0d (diff) | |
parent | 0dbe69aa34948d73d5709a7ddc19389e05e1a268 (diff) | |
download | vyos-cloud-init-318bd66461cba2f480b2ef6be119d2fcd5c6e9c0.tar.gz vyos-cloud-init-318bd66461cba2f480b2ef6be119d2fcd5c6e9c0.zip |
merge from trunk
Diffstat (limited to 'cloudinit/sources/helpers/azure.py')
-rw-r--r-- | cloudinit/sources/helpers/azure.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/azure.py b/cloudinit/sources/helpers/azure.py index 018cac6d..63ccf10e 100644 --- a/cloudinit/sources/helpers/azure.py +++ b/cloudinit/sources/helpers/azure.py @@ -5,6 +5,7 @@ import socket import struct import tempfile import time + from contextlib import contextmanager from xml.etree import ElementTree @@ -220,7 +221,7 @@ class WALinuxAgentShim(object): if 'unknown-245' in line: value = line.strip(' ').split(' ', 2)[-1].strip(';\n"') if value is None: - raise Exception('No endpoint found in DHCP config.') + raise ValueError('No endpoint found in DHCP config.') endpoint_ip_address = WALinuxAgentShim.get_ip_from_lease_value(value) LOG.debug('Azure endpoint found at %s', endpoint_ip_address) return endpoint_ip_address |