From 04d0e8b7eaadfe8dc45c46b98b7ec93daa70a491 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 8 Oct 2010 11:47:13 +0400 Subject: [PATCH] Fix output warning message about overwrite image. Overwrite message was displayed only if image place on root partition. --- pym/cl_builder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/cl_builder.py b/pym/cl_builder.py index e7252be..c7d22d9 100644 --- a/pym/cl_builder.py +++ b/pym/cl_builder.py @@ -212,12 +212,12 @@ class cl_builder(color_print): imagefile = self.clVars.Get('cl_builder_image') if imagefile: self.printSUCCESS(_("Image will be created at: %s")% imagefile) + if path.exists(imagefile): + self.printWARNING(_("WARNING") +": " + + _("image already exists") + ", "+ + _("continuation of the operation will overwrite it")) if self.getParentMountFor(path.dirname(path.normpath( imagefile))) == "/": - if path.exists(imagefile): - self.printWARNING(_("WARNING") +": " + - _("image already exists") + ", "+ - _("continuation of the operation will overwrite it")) if self.clVars.Get('os_root_type')=='livecd': self.printWARNING(_("WARNING") +": " + _("image will be created on temporary filesystem"))