Message337183
A little simplified reproducer :
import io, contextlib, logging
message = 'dummy test'
with io.StringIO() as sio:
with contextlib.redirect_stdout(sio), contextlib.redirect_stderr(sio):
logging.warning(message)
output = sio.getvalue()
print(output)
logging.warning(message)
$ python3.7 /tmp/foo.py
WARNING:root:dummy test
--- Logging error ---
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1036, in emit
stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
File "/tmp/foo.py", line 11, in <module>
logging.warning(message)
Message: 'dummy test'
Arguments: () |
|
Date |
User |
Action |
Args |
2019-03-05 11:57:01 | xtreak | set | recipients:
+ xtreak, vinay.sajip, andriusl |
2019-03-05 11:57:01 | xtreak | set | messageid: <1551787021.83.0.805979644309.issue36193@roundup.psfhosted.org> |
2019-03-05 11:57:01 | xtreak | link | issue36193 messages |
2019-03-05 11:57:01 | xtreak | create | |
|