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 6ff8903

Browse filesBrowse files
authored
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475)
1 parent aaa83cd commit 6ff8903
Copy full SHA for 6ff8903

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
@@ -359,7 +359,8 @@ def getFilesToDelete(self):
359359
dirName, baseName = os.path.split(self.baseFilename)
360360
fileNames = os.listdir(dirName)
361361
result = []
362-
prefix = baseName + "."
362+
# See bpo-44753: Don't use the extension when computing the prefix.
363+
prefix = os.path.splitext(baseName)[0] + "."
363364
plen = len(prefix)
364365
for fileName in fileNames:
365366
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.