[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7283 - trunk/gnue-common/src/apps
From: |
reinhard |
Subject: |
[gnue] r7283 - trunk/gnue-common/src/apps |
Date: |
Thu, 31 Mar 2005 16:30:21 -0600 (CST) |
Author: reinhard
Date: 2005-03-31 16:30:20 -0600 (Thu, 31 Mar 2005)
New Revision: 7283
Modified:
trunk/gnue-common/src/apps/plugin.py
Log:
Better use of detail feature for plugin loader exceptions.
Modified: trunk/gnue-common/src/apps/plugin.py
===================================================================
--- trunk/gnue-common/src/apps/plugin.py 2005-03-31 21:53:42 UTC (rev
7282)
+++ trunk/gnue-common/src/apps/plugin.py 2005-03-31 22:30:20 UTC (rev
7283)
@@ -88,25 +88,23 @@
self.exceptions = exceptions
if self.exceptions:
- message = u_("Cannot load plugin %s\n"
- "The following plugins failed:\n") % self.name
- self.detail = message
- for (name, exc) in exceptions.items ():
- shortlist = traceback.format_exception_only (exc [0], exc [1])
- del shortlist [1:2]
- shortmsg = unicode (string.join (shortlist, ''), i18n.getencoding ())
- longlist = traceback.format_exception (*exc)
- del longlist [1:2]
- longmsg = unicode (string.join (longlist, ''), i18n.getencoding ())
- message += "* %s: %s" % (name, shortmsg)
- self.detail += "* %s: %s" % (name, longmsg)
+ message = u_("Cannot load plugin '%s'") % self.name
+ detail = u_("The following plugins failed:\n")
+ for (name, exc) in self.exceptions.items ():
+ list = traceback.format_exception_only (exc [0], exc [1])
+ del list [1:2]
+ msg = unicode (string.join (list, ''), i18n.getencoding ())
+ detail += "* %s: %s" % (name, msg)
else:
- message = u_("Cannot find plugin %s") % self.name
- self.detail = message
+ message = u_("Cannot find plugin '%s'") % self.name
+ detail = None
errors.AdminError.__init__ (self, message)
+ if detail:
+ self.detail = detail
+
# -----------------------------------------------------------------------------
# List all available plugins
# -----------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7283 - trunk/gnue-common/src/apps,
reinhard <=