Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350400 - dev-lang/python-3.1.3: logging.handlers.TimedRotatingFileHandler.__init__(): NameError for ST_MTIME
Summary: dev-lang/python-3.1.3: logging.handlers.TimedRotatingFileHandler.__init__(): ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue10810
Whiteboard: 3.1.3-r1
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-02 20:05 UTC by Stijn Vanpraet
Modified: 2011-02-21 23:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.