[Python-checkins] python/dist/src/Lib fileinput.py,1.15,1.16

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2003年1月08日 08:33:19 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv29515/Lib
Modified Files:
	fileinput.py 
Log Message:
Test that chmod() actually exists before calling it (it doesn't on MacOS9).
Index: fileinput.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/fileinput.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** fileinput.py	14 Aug 2002 02:58:16 -0000	1.15
--- fileinput.py	8 Jan 2003 16:33:16 -0000	1.16
***************
*** 310,314 ****
 self._output = os.fdopen(fd, "w")
 try:
! os.chmod(self._filename, perm)
 except OSError:
 pass
--- 310,315 ----
 self._output = os.fdopen(fd, "w")
 try:
! if hasattr(os, 'chmod'):
! os.chmod(self._filename, perm)
 except OSError:
 pass

AltStyle によって変換されたページ (->オリジナル) /