summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-10-04 17:32:48 -0400
committerScott Moser <smoser@ubuntu.com>2013-10-04 17:32:48 -0400
commit4caf39f2631643ac4facf2706716a7972d146128 (patch)
tree451d57473fdff2dc10a558623e841b54e867a9b1
parent88dfa795a039834f3509cb12aed9f50b9f44d05b (diff)
downloadvyos-cloud-init-4caf39f2631643ac4facf2706716a7972d146128.tar.gz
vyos-cloud-init-4caf39f2631643ac4facf2706716a7972d146128.zip
remove duplicate code
-rw-r--r--cloudinit/config/cc_mounts.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index 1ec39e3c..1a8ebaa3 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -131,25 +131,11 @@ def handle(_name, cfg, cloud, log, _args):
start = defmnt[0]
sanitized = sanitize_devname(start, cloud.device_name_to_device, log)
if sanitized is None:
- log.debug("Ignorming nonexistant named mount %s", start)
+ log.debug("Ignoring nonexistant default named mount %s", start)
if sanitized != start:
- log.debug("changed %s => %s" % (start, sanitized))
+ log.debug("changed default device %s => %s" % (start, sanitized))
defmnt[0] = sanitized
- devname = defmnt[0]
- if candidate_name is not None:
- dev = candidate_name
- if devname is None:
- log.debug("Ignoring nonexistant named default mount %s", startname)
- continue
- devname = devnode_for_dev_part(devname, part)
- if devname.startswith("/"):
- defmnt[0] = devname
- else:
- defmnt[0] = "/dev/%s" % devname
-
- log.debug("Mapped default device %s to %s", startname, defmnt[0])
-
cfgmnt_has = False
for cfgm in cfgmnt:
if cfgm[0] == defmnt[0]: