From 3f96e2809c29af300ffa78c9cbee401904c8defe Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 27 Sep 2013 16:44:41 -0400 Subject: fix one bug --- cloudinit/config/cc_disk_setup.py | 9 +++++---- 1 file 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: -- cgit v1.2.1