summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers/azure.py
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-24 17:58:18 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-24 17:58:18 +0200
commit81156aa423309c72f17709eea994e7e06ebc431c (patch)
tree4ee78fb024c5f03a3c12e39e1adfc1b0cb84063b /cloudinit/sources/helpers/azure.py
parent14040a9c8df6e8406acb79fd653873bb05cb4d40 (diff)
parentea4bc2c603a9d964a918e01d00e39a851e979830 (diff)
downloadvyos-cloud-init-81156aa423309c72f17709eea994e7e06ebc431c.tar.gz
vyos-cloud-init-81156aa423309c72f17709eea994e7e06ebc431c.zip
rebased with upstream and reolved merge conflicts
Diffstat (limited to 'cloudinit/sources/helpers/azure.py')
-rw-r--r--cloudinit/sources/helpers/azure.py3
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