Skip to content

Commit 364a887

Browse files
committed
fix: issue2551396: os.path.stat.ST_MTIME + windows python 3.13 crashes
Looks like os.path.stat was removed in 3.13 on windows. Use stat.ST_MTIME instead. stat.ST_MTIME is also used in cgi/client.py.
1 parent 32854cf commit 364a887

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roundup/cgi/engine_zopetal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import mimetypes
88
import os
99
import os.path
10+
import stat
1011

1112
from roundup.cgi.templating import StringIO, context, TALLoaderBase
1213
from roundup.cgi.PageTemplates import PageTemplate
@@ -30,7 +31,7 @@ def load(self, tplname):
3031

3132
# has it changed?
3233
try:
33-
stime = os.stat(src)[os.path.stat.ST_MTIME]
34+
stime = os.stat(src)[stat.ST_MTIME]
3435
except os.error as error:
3536
if error.errno != errno.ENOENT:
3637
raise

0 commit comments

Comments
 (0)