]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-99811: Use correct variable to search for time in format string (GH-99812)
authorcemysce <13400533+cemysce@users.noreply.github.com>
Mon, 28 Nov 2022 18:25:03 +0000 (13:25 -0500)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2022 18:25:03 +0000 (18:25 +0000)
Use correct variable to search for asctime

Lib/logging/__init__.py

index 86e1efe6e653accaad08a06f04dd1119230b246a..9241d73d0fd03c110b5f767a2d4ed806b4f9f263 100644 (file)
@@ -511,7 +511,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