Issue562943

classification
Title: os.path.getmtime misbehaves on nonfile
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn
Priority: normal Keywords:

Created on 2002-05-31.15:14:33 by anonymous, last changed 2002-09-18.14:36:31 by bckfnn.

Messages
msg664 (view) Author: Nobody/Anonymous (nobody) Date: 2002-05-31.15:14:33
os.path.gmtime returns 0.0 for missing files 
instead of throwing an OSError (as python does)

>python
Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 
bit (Intel)] on win32
Type "copyright", "credits" or "license" for more 
information.
>>> import os.path
>>> os.path.getmtime('nonfile')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\Python2.1\lib\ntpath.py", line 183, in 
getmtime
    st = os.stat(filename)
OSError: [Errno 2] No such file or directory: 'nonfile'
>>> ^


>jython
Jython 2.1 on java1.3.1_01 (JIT: null)
Type "copyright", "credits" or "license" for more 
information.
>>> import os.path
>>> os.path.getmtime('nonfile')
0.0
>>>
msg665 (view) Author: Finn Bock (bckfnn) Date: 2002-09-18.14:33:47
Logged In: YES 
user_id=4201

Added as test370.
msg666 (view) Author: Finn Bock (bckfnn) Date: 2002-09-18.14:36:31
Logged In: YES 
user_id=4201

Fixed in javapath.py: 1.10;
History
Date User Action Args
2002-05-31 15:14:33anonymouscreate