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
commit3f96e2809c29af300ffa78c9cbee401904c8defe (patch)
treebca58349248cc8ac072b45e8facdeb313327306b
parent5151f08c61a996ada0917a23cbd1288fdaec8837 (diff)
downloadcloud-init-3f96e2809c29af300ffa78c9cbee401904c8defe.tar.gz
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: