summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2002-06-06 09:48:13 +0000
committerWalter Dörwald <walter@livinglogic.de>2002-06-06 09:48:13 +0000
commit294bbf3a59255119cc4de3f85762ce47cd1d09e3 (patch)
tree4a3d57d008fc1cfe4c1ebdecc91e45f48d6cba35 /Lib/fileinput.py
parentCRLF -> LF (diff)
downloadcpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.tar.gz
cpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.tar.bz2
cpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.zip
Replace obsolete stat module constants with
equivalent attributes in a few more spots. This closes SF patch http://www.python.org/sf/562373
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r--Lib/fileinput.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py
index 5626ee8adc0..d45aeca960b 100644
--- a/Lib/fileinput.py
+++ b/Lib/fileinput.py
@@ -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: