[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5532 - trunk/gnue-common/src/apps
From: |
reinhard |
Subject: |
r5532 - trunk/gnue-common/src/apps |
Date: |
Fri, 26 Mar 2004 09:23:30 -0600 (CST) |
Author: reinhard
Date: 2004-03-26 09:23:29 -0600 (Fri, 26 Mar 2004)
New Revision: 5532
Modified:
trunk/gnue-common/src/apps/plugin.py
Log:
Fixes for exceptions containing non-ASCII characters.
Modified: trunk/gnue-common/src/apps/plugin.py
===================================================================
--- trunk/gnue-common/src/apps/plugin.py 2004-03-26 14:51:44 UTC (rev
5531)
+++ trunk/gnue-common/src/apps/plugin.py 2004-03-26 15:23:29 UTC (rev
5532)
@@ -59,7 +59,7 @@
import sys
import traceback
-from gnue.common.apps import GDebug
+from gnue.common.apps import GDebug, i18n
# =============================================================================
# Exceptions
@@ -89,9 +89,13 @@
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.encoding)
longlist = traceback.format_exception (*exc)
- message += "* %s: %s" % (name, string.join (shortlist, ''))
- self.detail += "* %s: %s" % (name, string.join (longlist, ''))
+ del longlist [1:2]
+ longmsg = unicode (string.join (longlist, ''), i18n.encoding)
+ message += "* %s: %s" % (name, shortmsg)
+ self.detail += "* %s: %s" % (name, longmsg)
else:
message = u_("Cannot find plugin %s") % self.name
self.detail = message
@@ -296,7 +300,7 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
print
@@ -307,7 +311,7 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
print
@@ -318,7 +322,7 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
print
@@ -329,7 +333,7 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
print
@@ -340,7 +344,7 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
else:
@@ -351,4 +355,4 @@
except LoadError, e:
print e
print "Detail:"
- print e.detail,
+ print o(e.detail),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5532 - trunk/gnue-common/src/apps,
reinhard <=