Skip to content

Commit

Permalink
logging: Fix StreamHandler to call parent constructor.
Browse files Browse the repository at this point in the history
Otherwise there's a crash on line 70 where level is not a property of the
class unless explicitly set with `setLevel()`.
  • Loading branch information
greezybacon authored and dpgeorge committed Jul 3, 2024
1 parent 50ac49c commit b5aa5f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions python-stdlib/logging/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def format(self, record):

class StreamHandler(Handler):
def __init__(self, stream=None):
super().__init__()
self.stream = _stream if stream is None else stream
self.terminator = "\n"

Expand Down
2 changes: 1 addition & 1 deletion python-stdlib/logging/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metadata(version="0.6.0")
metadata(version="0.6.1")

module("logging.py")

0 comments on commit b5aa5f0

Please sign in to comment.