]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] gh-99811: Use correct variable to search for time in format string (GH-99812...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 28 Nov 2022 19:17:31 +0000 (11:17 -0800)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2022 19:17:31 +0000 (19:17 +0000)
(cherry picked from commit 1d1bb95abdcafe92c771fb3dc4722351b032cc24)
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
Lib/logging/__init__.py

index 09810bdf0d0beafde60f9631ed3b7fc3b67fa490..d1d43338585b648e315c698f9476b46fc56b032a 100644 (file)
@@ -487,7 +487,7 @@ class StringTemplateStyle(PercentStyle):
 
     def usesTime(self):
         fmt = self._fmt
-        return fmt.find('$asctime') >= 0 or fmt.find(self.asctime_format) >= 0
+        return fmt.find('$asctime') >= 0 or fmt.find(self.asctime_search) >= 0
 
     def validate(self):
         pattern = Template.pattern