[Python-checkins] python/dist/src/Lib/logging __init__.py, 1.24.2.2, 1.24.2.3
vsajip@users.sourceforge.net
vsajip at users.sourceforge.net
Fri Oct 7 10:36:36 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/logging
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18262
Modified Files:
Tag: release24-maint
__init__.py
Log Message:
Fixed bug where the logging message was wrongly being demoted from Unicode to string (SF #1314107)
Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/logging/__init__.py,v
retrieving revision 1.24.2.2
retrieving revision 1.24.2.3
diff -u -d -r1.24.2.2 -r1.24.2.3
--- __init__.py 16 Sep 2005 10:44:40 -0000 1.24.2.2
+++ __init__.py 7 Oct 2005 08:36:33 -0000 1.24.2.3
@@ -41,8 +41,8 @@
__author__ = "Vinay Sajip <vinay_sajip at red-dove.com>"
__status__ = "beta"
-__version__ = "0.4.9.6"
-__date__ = "27 March 2005"
+__version__ = "0.4.9.7"
+__date__ = "07 October 2005"
#---------------------------------------------------------------------------
# Miscellaneous module data
@@ -266,10 +266,12 @@
if not hasattr(types, "UnicodeType"): #if no unicode support...
msg = str(self.msg)
else:
- try:
- msg = str(self.msg)
- except UnicodeError:
- msg = self.msg #Defer encoding till later
+ msg = self.msg
+ if type(msg) not in (types.UnicodeType, types.StringType):
+ try:
+ msg = str(self.msg)
+ except UnicodeError:
+ msg = self.msg #Defer encoding till later
if self.args:
msg = msg % self.args
return msg
More information about the Python-checkins
mailing list