[jhbuild] Show friendly message when a module is not found



commit 349aa8c624ae834cdcf2c2956741825cb35ea5da
Author: Pablo Castellano <pablog src gnome org>
Date:   Sat Jan 2 23:50:54 2010 +0100

    Show friendly message when a module is not found

 jhbuild/moduleset.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index f38f970..f3f7b38 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -56,7 +56,8 @@ class ModuleSet:
                     logging.info(_('fixed case of module \'%(orig)s\' to \'%(new)s\'') % {
                             'orig': module_name, 'new': module})
                 return self.modules[module]
-        raise KeyError(module_name)
+        print "Couldn't find the specified module: %s" % module_name
+        sys.exit(2)
 
     def get_module_list(self, seed, skip=[], tags=[], ignore_cycles=False,
                 ignore_suggests=False, include_optional_modules=False,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]