Vinay Sajip <vinay_sa...@yahoo.co.uk> 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to