This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bobf
Recipients bobf
Date 2008-06-16.22:53:57
SpamBayes Score 0.048232403
Marked as misclassified No
Message-id <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for the sys module says:
"stdout and stderr needn't be built-in file objects: any object is 
acceptable as long as it has a write() method that takes a string 
argument."

However, the logging module calls flush() and close() on 
StreamHandler.stream (and stream may be stdout), yet stdout does not 
apparently need to have these methods - this caused breakage for a 
program of mine that redirects stdout and can import arbitrary modules 
(it's an interactive interpreter).

The attached patch checks that these two methods exist (using hastattr) 
before calling them.
History
Date User Action Args
2008-06-16 22:54:06bobfsetspambayes_score: 0.0482324 -> 0.048232403
recipients: + bobf
2008-06-16 22:54:06bobfsetspambayes_score: 0.0482324 -> 0.0482324
messageid: <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za>
2008-06-16 22:54:04bobflinkissue3126 messages
2008-06-16 22:54:03bobfcreate