Skip to content

Commit

Permalink
fix handling of stream
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 11, 2023
1 parent 0c3d351 commit 2b5f3d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbconvert/writers/stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def write(self, output, resources, **kw):
"""
stream = io.unicode_std_stream()
stream.write(output)
stream.stream.close()
stream.close()
2 changes: 1 addition & 1 deletion tests/utils/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_UnicodeStdStream():
sample = "@łe¶ŧ←"
stream = unicode_std_stream()
stream.write(sample)
stream.stream.close()
stream.close()

output = stdoutb.getvalue().decode("utf-8")
assert output == sample
Expand Down

0 comments on commit 2b5f3d4

Please sign in to comment.