Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit317e0c9

Browse files
[3.9]bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) (GH-29313)
1 parenta043706 commit317e0c9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎Lib/logging/handlers.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,13 @@ def getFilesToDelete(self):
368368
forfileNameinfileNames:
369369
iffileName[:plen]==prefix:
370370
suffix=fileName[plen:]
371-
ifself.extMatch.match(suffix):
372-
result.append(os.path.join(dirName,fileName))
371+
# See bpo-45628: The date/time suffix could be anywhere in the
372+
# filename
373+
parts=suffix.split('.')
374+
forpartinparts:
375+
ifself.extMatch.match(part):
376+
result.append(os.path.join(dirName,fileName))
377+
break
373378
iflen(result)<self.backupCount:
374379
result= []
375380
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp