From: <no...@so...> - 2002-05-31 15:14:34
|
Bugs item #562943, was opened at 2002-05-31 08:14 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=562943&group_id=12867 Category: Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: os.path.getmtime misbehaves on nonfile Initial Comment: 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 >>> ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=562943&group_id=12867 |