summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-09-27 16:44:41 -0400
committerScott Moser <smoser@ubuntu.com>2013-09-27 16:44:41 -0400
commit5b0e1eb11f12772e73205657355752b8c64d20cd (patch)
treebca58349248cc8ac072b45e8facdeb313327306b
parent31a094f21abd836a8012e5b0e25b3da67865fd1d (diff)
downloadvyos-cloud-init-5b0e1eb11f12772e73205657355752b8c64d20cd.tar.gz
vyos-cloud-init-5b0e1eb11f12772e73205657355752b8c64d20cd.zip
fix one bug
-rw-r--r--cloudinit/config/cc_disk_setup.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py
index e64176ba..ebff6e62 100644
--- a/cloudinit/config/cc_disk_setup.py
+++ b/cloudinit/config/cc_disk_setup.py
@@ -650,13 +650,14 @@ def mkfs(fs_cfg):
# Make sure the device is defined
if not device:
- LOG.critical("Device is not known: %s" % fs_cfg)
+ LOG.warn("Device is not known: %s", device)
return
# Check that we can create the FS
- if not label or not fs_type:
- LOG.debug("Command to create filesystem %s is bad. Skipping." % \
- label)
+ if not (fs_type or fs_cmd):
+ raise Exception("No way to create filesystem '%s'. fs_type or fs_cmd "
+ "must be set.", label)
+
# Create the commands
if fs_cmd: