You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TimedRotatingFileHandler crashes on backup file deletion attempt #47178
Hello,
when the maximum number of backup files is reached
TimedRotatingFileHandler can't delete the oldest existing file. I got
the following error message:
Traceback (most recent call last):
File "D:\Python25\lib\logging\handlers.py", line 75, in emitself.doRollover()
File "D:\Python25\lib\logging\handlers.py", line 319, in doRollover
os.remove(s)
WindowsError: [Error 2] The system cannot find the file specified:
'assyst.log.2008-05-20_12-49'
The reason for this error is located in the getFilesToDelete method of
the TimedRotatingFileHandler class. The result sequence of this method
contains filenames but a complete filepath is needed.
After replacing
result.append(fileName)
with
result.append(os.path.join(dirName, fileName))
the problem seems to be solved
Activity
blocki commentedon May 20, 2008
Hello,
when the maximum number of backup files is reached
TimedRotatingFileHandler can't delete the oldest existing file. I got
the following error message:
The reason for this error is located in the getFilesToDelete method of
the TimedRotatingFileHandler class. The result sequence of this method
contains filenames but a complete filepath is needed.
After replacing
result.append(fileName)
with
result.append(os.path.join(dirName, fileName))
the problem seems to be solved
Regards
Stephan
vsajip commentedon May 20, 2008
Fix checked into trunk (r63507). Thanks for the report!