summaryrefslogtreecommitdiffstats
path: root/Lib/logging/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r--Lib/logging/handlers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 296d6cf..ba00a69 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -246,6 +246,9 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
self.extMatch = re.compile(self.extMatch, re.ASCII)
self.interval = self.interval * interval # multiply by units requested
+ # The following line added because the filename passed in could be a
+ # path object (see Issue #27493), but self.baseFilename will be a string
+ filename = self.baseFilename
if os.path.exists(filename):
t = os.stat(filename)[ST_MTIME]
else: