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
83470420
Commit
83470420
authored
Feb 17, 2009
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5287: Add exception handling around findCaller() call to help out IronPython.
parent
62ba5af0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Lib/logging/__init__.py
Lib/logging/__init__.py
+8
-3
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/logging/__init__.py
View file @
83470420
# Copyright 2001-200
8
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-200
9
by Vinay Sajip. All Rights Reserved.
#
#
# Permission to use, copy, modify, and distribute this software and its
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# documentation for any purpose and without fee is hereby granted,
...
@@ -44,7 +44,7 @@ except ImportError:
...
@@ -44,7 +44,7 @@ except ImportError:
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__status__
=
"production"
__status__
=
"production"
__version__
=
"0.5.0.5"
__version__
=
"0.5.0.5"
__date__
=
"
20 Jan
uary 2009"
__date__
=
"
17 Febr
uary 2009"
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Miscellaneous module data
# Miscellaneous module data
...
@@ -1118,7 +1118,12 @@ class Logger(Filterer):
...
@@ -1118,7 +1118,12 @@ class Logger(Filterer):
all the handlers of this logger to handle the record.
all the handlers of this logger to handle the record.
"""
"""
if
_srcfile
:
if
_srcfile
:
fn
,
lno
,
func
=
self
.
findCaller
()
#IronPython doesn't track Python frames, so findCaller throws an
#exception. We trap it here so that IronPython can use logging.
try
:
fn
,
lno
,
func
=
self
.
findCaller
()
except
ValueError
:
fn
,
lno
,
func
=
"(unknown file)"
,
0
,
"(unknown function)"
else
:
else
:
fn
,
lno
,
func
=
"(unknown file)"
,
0
,
"(unknown function)"
fn
,
lno
,
func
=
"(unknown file)"
,
0
,
"(unknown function)"
if
exc_info
:
if
exc_info
:
...
...
Misc/NEWS
View file @
83470420
...
@@ -80,6 +80,9 @@ Core and Builtins
...
@@ -80,6 +80,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #5287: Add exception handling around findCaller() call in logging to
help out IronPython.
- Issue #4524: distutils build_script command failed with --with-suffix=3.
- Issue #4524: distutils build_script command failed with --with-suffix=3.
Initial patch by Amaury Forgeot d'Arc.
Initial patch by Amaury Forgeot d'Arc.
...
...
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