Message155163
The same problem that caused problems to py.test caused problems also to Robot Framework:
http://code.google.com/p/robotframework/issues/detail?id=1079
I was surprised to notice this issue was closed as invalid although the problem didn't occur with Python 2.7 anymore. After a little more digging I noticed that the proposed fix has actually been done in r84282 as part of fixing issue 9051. The fix doesn't check for `closed` attribute but instead silences possible ValueError.
We also noticed a variation of the problem: If the registered handler ever tries to write anything to its stream you also get an exception. We decided to silence all these errors with this code:
import logging
logging.raiseExceptions = False
Finally, I consider it a separate bug that logging.StreamHandler uses sys.stderr by default. It should use sys.__stderr__ instead. |
|
Date |
User |
Action |
Args |
2012-03-08 14:54:39 | pekka.klarck | set | recipients:
+ pekka.klarck, vinay.sajip, srid, hpk |
2012-03-08 14:54:39 | pekka.klarck | set | messageid: <1331218479.48.0.416157756668.issue6333@psf.upfronthosting.co.za> |
2012-03-08 14:54:38 | pekka.klarck | link | issue6333 messages |
2012-03-08 14:54:38 | pekka.klarck | create | |
|