Skip to content

Commit

Permalink
bpo-44753: Don't use logfile extension when determining old files to …
Browse files Browse the repository at this point in the history
…be deleted (GH-27475)
  • Loading branch information
vsajip authored Jul 30, 2021
1 parent aaa83cd commit 6ff8903
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/logging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ def getFilesToDelete(self):
dirName, baseName = os.path.split(self.baseFilename)
fileNames = os.listdir(dirName)
result = []
prefix = baseName + "."
# See bpo-44753: Don't use the extension when computing the prefix.
prefix = os.path.splitext(baseName)[0] + "."
plen = len(prefix)
for fileName in fileNames:
if fileName[:plen] == prefix:
Expand Down

0 comments on commit 6ff8903

Please sign in to comment.