Vinay Sajip <[email protected]> added the comment:
RotatingFileHandler is also affected by the same issue.
Both RotatingFileHandler and TimedRotatingFileHandler have a shouldRollover
method which, if it returns False, should prevent rollover.
I would think that putting something like
if not os.path.isfile(self.baseFilename):
return False
at the top of each of these methods should avoid rolling over any thing that
isn't a regular file - devices, pipes etc. Would you agree? Can you see any
drawbacks?
I'm not sure this would cover sockets, but there are separate handlers for
using sockets so there would be no reason for people to use sockets with file
handlers. And of course sockets are a completely different sort of beast on
Windows.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45401>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com