mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Replaced obsolete stat module constants with equivalent attributes
This commit is contained in:
parent
16e3c427f3
commit
32200aeac6
18 changed files with 59 additions and 79 deletions
|
@ -484,7 +484,7 @@ def _os_path_isdir(pathname):
|
|||
s = _os_stat(pathname)
|
||||
except OSError:
|
||||
return None
|
||||
return (s[0] & 0170000) == 0040000
|
||||
return (s.st_mode & 0170000) == 0040000
|
||||
|
||||
def _timestamp(pathname):
|
||||
"Return the file modification time as a Long."
|
||||
|
@ -492,7 +492,7 @@ def _timestamp(pathname):
|
|||
s = _os_stat(pathname)
|
||||
except OSError:
|
||||
return None
|
||||
return long(s[8])
|
||||
return long(s.st_mtime)
|
||||
|
||||
|
||||
######################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue