Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 882e476

Browse filesBrowse files
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475) (GH-27486)
(cherry picked from commit 6ff8903)
1 parent 3a806b1 commit 882e476
Copy full SHA for 882e476

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎Lib/logging/handlers.py

Copy file name to clipboardExpand all lines: Lib/logging/handlers.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ def getFilesToDelete(self):
356356
dirName, baseName = os.path.split(self.baseFilename)
357357
fileNames = os.listdir(dirName)
358358
result = []
359-
prefix = baseName + "."
359+
# See bpo-44753: Don't use the extension when computing the prefix.
360+
prefix = os.path.splitext(baseName)[0] + "."
360361
plen = len(prefix)
361362
for fileName in fileNames:
362363
if fileName[:plen] == prefix:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.