summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-09-10 15:32:32 -0400
committerScott Moser <smoser@ubuntu.com>2010-09-10 15:32:32 -0400
commitb7102641ffe6baf6a14d36116706a117f7770208 (patch)
tree3ab9cd705d5f2c1bb68295c97c846b116a281c4d /cloudinit
parent45a73d89e033e21c92ccaecf4d4f550e34e28ff8 (diff)
downloadvyos-cloud-init-b7102641ffe6baf6a14d36116706a117f7770208.tar.gz
vyos-cloud-init-b7102641ffe6baf6a14d36116706a117f7770208.zip
cc_mounts.py: convert user input from int to string
for 'mounts' entries that yaml interprets as integers, we need to be strings. This is because of he 'join' that is used on the array. For example: mounts: - [ ebs1, none, swap, sw, 0, 0 ] was throwing error when the array was joined.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/CloudConfig/cc_mounts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/CloudConfig/cc_mounts.py b/cloudinit/CloudConfig/cc_mounts.py
index c8746d33..8ee4f718 100644
--- a/cloudinit/CloudConfig/cc_mounts.py
+++ b/cloudinit/CloudConfig/cc_mounts.py
@@ -70,6 +70,10 @@ def handle(name,cfg,cloud,log,args):
if shortname.match(cfgmnt[i][0]):
cfgmnt[i][0] = "/dev/%s" % cfgmnt[i][0]
+ # in case the user did not quote a field (likely fs-freq, fs_passno)
+ for j in range(len(cfgmnt[i])):
+ cfgmnt[i][j]=str(cfgmnt[i][j])
+
for i in range(len(cfgmnt)):
# fill in values with defaults from defvals above
for j in range(len(defvals)):