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
6badbe9f
Commit
6badbe9f
authored
Jan 20, 2009
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 5013: Fixed bug in FileHandler when delay was set.
parent
29d93816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
Lib/logging/__init__.py
Lib/logging/__init__.py
+7
-7
Misc/NEWS
Misc/NEWS
+8
-5
No files found.
Lib/logging/__init__.py
View file @
6badbe9f
...
...
@@ -21,7 +21,7 @@ comp.lang.python, and influenced by Apache's log4j system.
Should work under Python versions >= 1.5.2, except that source line
information is not available unless 'sys._getframe()' is.
Copyright (C) 2001-200
8
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-200
9
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
...
...
@@ -47,7 +47,7 @@ except ImportError:
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__status__
=
"production"
__version__
=
"0.5.0.5"
__date__
=
"2
4 January 2008
"
__date__
=
"2
0 January 2009
"
#---------------------------------------------------------------------------
# Miscellaneous module data
...
...
@@ -730,7 +730,6 @@ class StreamHandler(Handler):
if
strm
is
None
:
strm
=
sys
.
stderr
self
.
stream
=
strm
self
.
formatter
=
None
def
flush
(
self
):
"""
...
...
@@ -785,10 +784,12 @@ class FileHandler(StreamHandler):
self
.
mode
=
mode
self
.
encoding
=
encoding
if
delay
:
#We don't open the stream, but we still need to call the
#Handler constructor to set level, formatter, lock etc.
Handler
.
__init__
(
self
)
self
.
stream
=
None
else
:
stream
=
self
.
_open
()
StreamHandler
.
__init__
(
self
,
stream
)
StreamHandler
.
__init__
(
self
,
self
.
_open
())
def
close
(
self
):
"""
...
...
@@ -820,8 +821,7 @@ class FileHandler(StreamHandler):
constructor, open it before calling the superclass's emit.
"""
if
self
.
stream
is
None
:
stream
=
self
.
_open
()
StreamHandler
.
__init__
(
self
,
stream
)
self
.
stream
=
self
.
_open
()
StreamHandler
.
emit
(
self
,
record
)
#---------------------------------------------------------------------------
...
...
Misc/NEWS
View file @
6badbe9f
...
...
@@ -12,6 +12,9 @@ What's New in Python 2.6.2
Core and Builtins
-----------------
- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
parameter was set.
- Issue #4935: The overflow checking code in the expandtabs() method common
to str, bytes and bytearray could be optimized away by the compiler, letting
the interpreter segfault instead of raising an error.
...
...
@@ -59,7 +62,7 @@ Core and Builtins
- Issue #4589: Fixed exception handling when the __exit__ function of a
context manager returns a value that cannot be converted to a bool.
- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
method on file objects with closefd=False. The file descriptor is still
kept open but the file object behaves like a closed file. The ``FileIO``
object also got a new readonly attribute ``closefd``.
...
...
@@ -182,7 +185,7 @@ Library
- Restore Python 2.3 compatibility for decimal.py.
- Issue #1702551: distutils sdist was not excluding VCS directories under
- Issue #1702551: distutils sdist was not excluding VCS directories under
Windows. Inital solution by Guy Dalberto.
- Issue #4812: add missing underscore prefix to some internal-use-only
...
...
@@ -191,8 +194,8 @@ Library
- Issue #4795: inspect.isgeneratorfunction() returns False instead of None when
the function is not a generator.
- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@')
works as expected in the interactive environment.
...
...
@@ -200,7 +203,7 @@ Library
- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
Gabriel Genellina.
- Issue #4646: distutils was choking on empty options arg in the setup
- Issue #4646: distutils was choking on empty options arg in the setup
function. Original patch by Thomas Heller.
- Issue #4400: .pypirc default generated file was broken in distutils.
...
...
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