Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
43d6e812
Commit
43d6e812
authored
Oct 07, 2005
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug where the logging message was wrongly being demoted from Unicode to string (SF #1314107)
parent
d1c1e10f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Lib/logging/__init__.py
Lib/logging/__init__.py
+8
-6
No files found.
Lib/logging/__init__.py
View file @
43d6e812
...
...
@@ -41,8 +41,8 @@ except ImportError:
__author__
=
"Vinay Sajip <vinay_sajip@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 @@ class LogRecord:
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment