]> scripts.mit.edu Git - wizard.git/commitdiff
Show *which* directory does not exist
authorAlex Dehnert <adehnert@mit.edu>
Tue, 27 Apr 2010 08:12:54 +0000 (04:12 -0400)
committerAlex Dehnert <adehnert@mit.edu>
Sun, 30 May 2010 23:06:25 +0000 (19:06 -0400)
Signed-off-by: Alex Dehnert <adehnert@mit.edu>
wizard/command/install.py

index e5d14656b9c874b2e3f81010122dbce5bf7e7f40..1faa72544084f90d83168edf2d6500ac46b33d00 100644 (file)
@@ -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):