From 443fc9f51a6e467a1299d93297ba4276027ad840 Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer <sebastien.luttringer@smartjog.com> Date: Thu, 8 Dec 2011 12:54:16 +0100 Subject: [PATCH] better error message in build comman --- bin/is | 2 +- installsystems/image.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/is b/bin/is index caaab5a..6700652 100755 --- a/bin/is +++ b/bin/is @@ -81,7 +81,7 @@ def c_add(parser, args): def c_build(parser, args): ''' - Build an image source + Build an image source in current directory ''' # build start time t0 = time.time() diff --git a/installsystems/image.py b/installsystems/image.py index d6fd3be..c1a5f22 100644 --- a/installsystems/image.py +++ b/installsystems/image.py @@ -148,13 +148,13 @@ class SourceImage(Image): ''' for d in (self.base_path, self.parser_path, self.setup_path, self.payload_path): if not os.path.exists(d): - raise Exception("Missing directory: %s" % d) + raise Exception("Invalid source image: %s is missing" % d) if not os.path.isdir(d): - raise Exception("Not a directory: %s" % d) + raise Exception("Invalid source image: %s is not a directory" % d) if not os.access(d, os.R_OK|os.X_OK): - raise Exception("Unable to access to %s" % d) + raise Exception("Invalid source image: unable to access to %s" % d) if not os.path.exists(os.path.join(self.base_path, "description")): - raise Exception("No description file") + raise Exception("Invalid source image: no description file") def build(self, force=False, force_payload=False, check=True): ''' -- GitLab