From 0f87df804e740152fb8d49a09ca08c34f984e734 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Tue, 27 Apr 2010 04:12:54 -0400 Subject: [PATCH] Show *which* directory does not exist Signed-off-by: Alex Dehnert --- wizard/command/install.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wizard/command/install.py b/wizard/command/install.py index e5d1465..1faa725 100644 --- a/wizard/command/install.py +++ b/wizard/command/install.py @@ -15,7 +15,7 @@ def main(argv, baton): web_stub_path = old_options.web_stub_path if not old_options.retry and not old_options.help and os.path.exists(dir) and os.listdir(dir): - raise DirectoryExistsError + raise DirectoryExistsError(dir) appname, _, version = appstr.partition('-') application = app.getApplication(appname) @@ -104,8 +104,10 @@ depending on what directory you are installing to.)""" return options, args class DirectoryExistsError(wizard.Error): + def __init__(self, dir=None, ): + self.dir = dir def __str__(self): - return "Directory already exists and is not empty" + return "Directory (%s) already exists and is not empty" % self.dir class NeedsWebStubError(wizard.Error): def __str__(self): -- 2.45.2