From b7102641ffe6baf6a14d36116706a117f7770208 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 10 Sep 2010 15:32:32 -0400 Subject: 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(+) (limited to 'cloudinit') 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)): -- cgit v1.2.3