In TimedRotatingFileHandler if you have a low volume logger than hasn't written to the log within the interval time doRollover will fail because there is no file to rotate. os.rename(self.baseFilename, dfn) should be something like if os.path.exists(self.base_fileName): os.rename(self.baseFilename, dfn I have included a unit test file. This test fails on 2.7.1 and 2.7.3. I have not tried 2.7.5.
files: + doRollover.patchmessages: + title: TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. -> TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time.