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

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Tue, 13 Aug 2002 19:58:18 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv2831

Modified Files:
	fileinput.py 
Log Message:
tightening up a few except: clauses
see bug 411881


Index: fileinput.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/fileinput.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** fileinput.py	6 Jun 2002 09:48:12 -0000	1.14
--- fileinput.py	14 Aug 2002 02:58:16 -0000	1.15
***************
*** 262,266 ****
          if backupfilename and not self._backup:
              try: os.unlink(backupfilename)
!             except: pass
  
          self._isstdin = False
--- 262,266 ----
          if backupfilename and not self._backup:
              try: os.unlink(backupfilename)
!             except OSError: pass
  
          self._isstdin = False
***************
*** 302,306 ****
                      try:
                          perm = os.fstat(self._file.fileno()).st_mode
!                     except:
                          self._output = open(self._filename, "w")
                      else:
--- 302,306 ----
                      try:
                          perm = os.fstat(self._file.fileno()).st_mode
!                     except OSError:
                          self._output = open(self._filename, "w")
                      else:
***************
*** 311,315 ****
                          try:
                              os.chmod(self._filename, perm)
!                         except:
                              pass
                      self._savestdout = sys.stdout
--- 311,315 ----
                          try:
                              os.chmod(self._filename, perm)
!                         except OSError:
                              pass
                      self._savestdout = sys.stdout