jhbuild r2170 - in trunk: . jhbuild jhbuild/commands
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2170 - in trunk: . jhbuild jhbuild/commands
- Date: Wed, 16 Jul 2008 22:11:39 +0000 (UTC)
Author: fpeters
Date: Wed Jul 16 22:11:39 2008
New Revision: 2170
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2170&view=rev
Log:
* jhbuild/commands/base.py, jhbuild/moduleset.py: fixed "module not
found" error messages to display the module that was not found, patch
by Behnam Esfahbod (closes: #543262); also cleaned up some conversion
of exceptions to strings.
Modified:
trunk/ChangeLog
trunk/jhbuild/commands/base.py
trunk/jhbuild/moduleset.py
Modified: trunk/jhbuild/commands/base.py
==============================================================================
--- trunk/jhbuild/commands/base.py (original)
+++ trunk/jhbuild/commands/base.py Wed Jul 16 22:11:39 2008
@@ -110,8 +110,7 @@
try:
module_list = [module_set.get_module(modname, ignore_case = True) for modname in args]
except KeyError, e:
- raise FatalError(_("A module called '%s' could not be found.")
- % str(e))
+ raise FatalError(_("A module called '%s' could not be found.") % e)
if not module_list:
self.parser.error(_('This command requires a module parameter.'))
@@ -330,8 +329,7 @@
try:
module_list = [module_set.get_module(modname, ignore_case = True) for modname in args]
except KeyError, e:
- raise FatalError(_("A module called '%s' could not be found.")
- % str(e))
+ raise FatalError(_("A module called '%s' could not be found.") % e)
if not module_list:
self.parser.error(_('This command requires a module parameter.'))
Modified: trunk/jhbuild/moduleset.py
==============================================================================
--- trunk/jhbuild/moduleset.py (original)
+++ trunk/jhbuild/moduleset.py Wed Jul 16 22:11:39 2008
@@ -55,7 +55,7 @@
_('I: fixed case of module \'%(orig)s\' to \'%(new)s\'') % {
'orig': module_name, 'new': module})
return self.modules[module]
- raise KeyError()
+ raise KeyError(module_name)
def get_module_list(self, seed, skip=[], tags=[], ignore_cycles = False,
include_optional_modules = False):
@@ -66,7 +66,7 @@
try:
all_modules = [self.get_module(mod, ignore_case = True) for mod in seed if mod not in skip]
except KeyError, e:
- raise UsageError(_('module "%s" not found') % str(e))
+ raise UsageError(_('module "%s" not found') % e)
asked_modules = all_modules[:]
@@ -265,12 +265,12 @@
try:
filename = httpcache.load(uri, nonetwork=config.nonetwork)
except Exception, e:
- raise FatalError(_('could not download %s: %s') % (uri, str(e)))
+ raise FatalError(_('could not download %s: %s') % (uri, e))
filename = os.path.normpath(filename)
try:
document = xml.dom.minidom.parse(filename)
except xml.parsers.expat.ExpatError, e:
- raise FatalError(_('failed to parse %s: %s') % (filename, str(e)))
+ raise FatalError(_('failed to parse %s: %s') % (filename, e))
assert document.documentElement.nodeName == 'moduleset'
moduleset = ModuleSet(config = config)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]