summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_mounts.py
diff options
context:
space:
mode:
authorBen Howard <ben.howard@canonical.com>2013-10-04 15:52:20 -0600
committerBen Howard <ben.howard@canonical.com>2013-10-04 15:52:20 -0600
commitff820acaf999479f75a12414ac5fcb12d51f258b (patch)
tree25d367e3e925a3625d25724ba0c6d1175df3be44 /cloudinit/config/cc_mounts.py
parent4caf39f2631643ac4facf2706716a7972d146128 (diff)
downloadvyos-cloud-init-ff820acaf999479f75a12414ac5fcb12d51f258b.tar.gz
vyos-cloud-init-ff820acaf999479f75a12414ac5fcb12d51f258b.zip
Fixed up issue with attempt to mount nonexistant swap
Diffstat (limited to 'cloudinit/config/cc_mounts.py')
-rw-r--r--cloudinit/config/cc_mounts.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index 1a8ebaa3..ff7bf506 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -45,7 +45,7 @@ def is_mdname(name):
return False
-def sanitize_devname(devname, transformer, log)
+def sanitize_devname(startname, transformer, log):
log.debug("Attempting to determine the real name of %s", startname)
# workaround, allow user to specify 'ephemeral'
@@ -96,6 +96,7 @@ def handle(_name, cfg, cloud, log, _args):
sanitized = sanitize_devname(start, cloud.device_name_to_device, log)
if sanitized is None:
log.debug("Ignorming nonexistant named mount %s", start)
+ continue
if sanitized != start:
log.debug("changed %s => %s" % (start, sanitized))
@@ -132,6 +133,7 @@ def handle(_name, cfg, cloud, log, _args):
sanitized = sanitize_devname(start, cloud.device_name_to_device, log)
if sanitized is None:
log.debug("Ignoring nonexistant default named mount %s", start)
+ continue
if sanitized != start:
log.debug("changed default device %s => %s" % (start, sanitized))
defmnt[0] = sanitized