In the exception handling for the fetch, use the value passed up as the message,...
authorChris Larson <clarson@kergoth.com>
Tue, 10 Jun 2003 21:28:24 +0000 (21:28 +0000)
committerChris Larson <clarson@kergoth.com>
Tue, 10 Jun 2003 21:28:24 +0000 (21:28 +0000)
bin/oebuild
bin/oefetch.py

index 18cd85b..cacf4f0 100644 (file)
@@ -166,16 +166,19 @@ def do_fetch():
                try:
                        grabber.init(getenv('SRC_URI').split())
                except oefetch.NoMethodError:
-                       fatal("No method for one or more urls in SRC_URI")
+                       (type, value, traceback) = sys.exc_info()
+                       fatal("No method: %s" % value)
                        return
 
                try:
                        grabber.go()
                except oefetch.MissingParameterError:
-                       fatal("Fetch failed due to missing parameters in the supplied urls")
+                       (type, value, traceback) = sys.exc_info()
+                       fatal("Missing parameters: %s" % value)
                        return
                except oefetch.FetchError:
-                       fatal("Fetch failed")
+                       (type, value, traceback) = sys.exc_info()
+                       fatal("Fetch failed: %s" % value)
                        return
                mkstamp('fetch')
        else:
index 230065c..e228889 100644 (file)
@@ -179,7 +179,7 @@ class Cvs(Fetch):
                for loc in urls:
                        (type, host, path, user, pswd, parm) = decodeurl(expand(loc))
                        if not parm.has_key("module"):
-                               raise MissingParameterError
+                               raise MissingParameterError("cvs method needs a 'module' parameter")
                        else:
                                module = parm["module"]