Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 350400

Summary: dev-lang/python-3.1.3: logging.handlers.TimedRotatingFileHandler.__init__(): NameError for ST_MTIME
Product: Gentoo Linux Reporter: Stijn Vanpraet <stijnvanpraet>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
URL: http://bugs.python.org/issue10810
Whiteboard: 3.1.3-r1
Package list:
Runtime testing required: ---

Description Stijn Vanpraet 2011-01-02 20:05:56 UTC
When creating a logging.handlers.TimedRotatingFileHandler object, an exception is raised complaining ST_MTIME is not defined if a logfile with the same name already exists.

 

Reproducible: Always

Steps to Reproduce:
1. Create file 'mylog.log'.
2. Create python script that creates an instance of logging.handlers.TimedRotatingFileHandler('myFile.log', 'D')
3. Run script

Actual Results:  
An exception is raised:

File "/usr/lib64/python3.1/logging/handlers.py"  line 206, in __init__
    t = os.stat(filename)[ST_MTIME]
NameError: global name 'ST_MTIME' is not defined.


I checked the upstream version of this file at svn.python.org.
This issue seems to be fixed by the maintainer somewhere in march 2010.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-21 23:15:37 UTC
Fixed in 3.1.3-r1.