From 5a26f28e69b70f882d1480411fbaa6d7c0a945a1 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 10 Sep 2010 15:32:32 -0400 Subject: [PATCH] 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. --- cloudinit/CloudConfig/cc_mounts.py | 4 ++++ 1 file changed, 4 insertions(+) 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)):