commit-gnue
[Top][All Lists]
Advanced

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

r6206 - trunk/gnue-common/src/apps


From: johannes
Subject: r6206 - trunk/gnue-common/src/apps
Date: Wed, 25 Aug 2004 07:53:05 -0500 (CDT)

Author: johannes
Date: 2004-08-25 07:53:05 -0500 (Wed, 25 Aug 2004)
New Revision: 6206

Modified:
   trunk/gnue-common/src/apps/GExceptions.py
Log:
getType () returns string not unicode, all exTypes are lowercase


Modified: trunk/gnue-common/src/apps/GExceptions.py
===================================================================
--- trunk/gnue-common/src/apps/GExceptions.py   2004-08-25 12:36:51 UTC (rev 
6205)
+++ trunk/gnue-common/src/apps/GExceptions.py   2004-08-25 12:53:05 UTC (rev 
6206)
@@ -19,7 +19,7 @@
 # write to the Free Software Foundation, Inc., 59 Temple Place
 # - Suite 330, Boston, MA 02111-1307, USA.
 #
-# $Id: $
+# $Id$
 
 import sys
 import traceback
@@ -42,8 +42,8 @@
   class.
   """
   def __init__ (self, message):
-    self.message = message
-    self.exType   = "gException"
+    self.message  = message
+    self.exType   = "system"
     self.exName   = None
     self.exDetail = None
     exceptions.Exception.__init__ (self, o(message))
@@ -56,9 +56,9 @@
     """
     This function returns the type (i.e. 'gException', 'System', 'User', ...)
     of the exception.
-    @return: type of the exception as unicode string
+    @return: type of the exception as string
     """
-    return self._fmtUnicode (self.exType)
+    return self.exType
 
 
   # ---------------------------------------------------------------------------
@@ -135,7 +135,7 @@
   """
   def __init__ (self, message):
     gException.__init__ (self, message)
-    self.exType = "System"
+    self.exType = "system"
 
 
 # =============================================================================
@@ -150,7 +150,7 @@
   """
   def __init__ (self, message):
     gException.__init__ (self, message)
-    self.exType = "Admin"
+    self.exType = "admin"
 
 
 # =============================================================================
@@ -164,7 +164,7 @@
   """
   def __init__ (self, message):
     gException.__init__ (self, message)
-    self.exType = "Application"
+    self.exType = "application"
 
 
 # =============================================================================
@@ -180,7 +180,7 @@
   """
   def __init__ (self, message):
     gException.__init__ (self, message)
-    self.exType = u"User"
+    self.exType = "user"
 
 
 # =============================================================================
@@ -229,7 +229,7 @@
     exDetail  = string.join (lines)
     if isinstance (exDetail, types.StringType):
       exDetail = unicode (exDetail, i18n.encoding)
-    return ('System', exName, exMessage, exDetail)
+    return ('system', exName, exMessage, exDetail)
 
 
 # =============================================================================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]