mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Replace obsolete stat module constants with
equivalent attributes in a few more spots. This closes SF patch http://www.python.org/sf/562373
This commit is contained in:
parent
c2009a8666
commit
294bbf3a59
2 changed files with 5 additions and 5 deletions
|
@ -79,7 +79,7 @@ XXX Possible additions:
|
|||
|
||||
"""
|
||||
|
||||
import sys, os, stat
|
||||
import sys, os
|
||||
|
||||
__all__ = ["input","close","nextfile","filename","lineno","filelineno",
|
||||
"isfirstline","isstdin","FileInput"]
|
||||
|
@ -300,7 +300,7 @@ class FileInput:
|
|||
os.rename(self._filename, self._backupfilename)
|
||||
self._file = open(self._backupfilename, "r")
|
||||
try:
|
||||
perm = os.fstat(self._file.fileno())[stat.ST_MODE]
|
||||
perm = os.fstat(self._file.fileno()).st_mode
|
||||
except:
|
||||
self._output = open(self._filename, "w")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue