[Python-checkins] CVS: python/dist/src/Lib aifc.py,1.37,1.38 audiodev.py,1.8,1.9 binhex.py,1.14,1.15 copy.py,1.14,1.15 ftplib.py,1.43,1.44 multifile.py,1.10,1.11

Fred L. Drake python-dev@python.org
Wed, 16 Aug 2000 22:06:52 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4151

Modified Files:
	aifc.py audiodev.py binhex.py copy.py ftplib.py multifile.py 
Log Message:

Convert some old-style string exceptions to class exceptions.


Index: aifc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/aifc.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** aifc.py	2000/07/16 12:04:30	1.37
--- aifc.py	2000/08/17 05:06:49	1.38
***************
*** 138,142 ****
  import __builtin__
  
! Error = 'aifc.Error'
  
  _AIFC_version = 0xA2805140      # Version 1 of AIFF-C
--- 138,143 ----
  import __builtin__
  
! class Error(Exception):
!     pass
  
  _AIFC_version = 0xA2805140      # Version 1 of AIFF-C

Index: audiodev.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/audiodev.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** audiodev.py	2000/02/02 15:10:14	1.8
--- audiodev.py	2000/08/17 05:06:49	1.9
***************
*** 1,5 ****
  """Classes for manipulating audio devices (currently only for Sun and SGI)"""
  
! error = 'audiodev.error'
  
  class Play_Audio_sgi:
--- 1,6 ----
  """Classes for manipulating audio devices (currently only for Sun and SGI)"""
  
! class error(Exception):
! 	pass
  
  class Play_Audio_sgi:

Index: binhex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/binhex.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** binhex.py	2000/07/16 12:04:30	1.14
--- binhex.py	2000/08/17 05:06:49	1.15
***************
*** 28,32 ****
  import binascii
      
! Error = 'binhex.Error'
  
  # States (what have we written)
--- 28,33 ----
  import binascii
      
! class Error(Exception):
!     pass
  
  # States (what have we written)

Index: copy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** copy.py	2000/02/04 15:39:29	1.14
--- copy.py	2000/08/17 05:06:49	1.15
***************
*** 53,58 ****
  import types
  
! error = 'copy.error'
! Error = error # backward compatibility
  
  def copy(x):
--- 53,59 ----
  import types
  
! class Error(Exception):
! 	pass
! error = Error	# backward compatibility
  
  def copy(x):

Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** ftplib.py	2000/08/16 20:30:21	1.43
--- ftplib.py	2000/08/17 05:06:49	1.44
***************
*** 57,70 ****
  
  # Exception raised when an error or invalid response is received
! error_reply = 'ftplib.error_reply'	# unexpected [123]xx reply
! error_temp = 'ftplib.error_temp'	# 4xx errors
! error_perm = 'ftplib.error_perm'	# 5xx errors
! error_proto = 'ftplib.error_proto'	# response does not begin with [1-5]
  
  
  # All exceptions (hopefully) that may be raised here and that aren't
  # (always) programming errors on our side
! all_errors = (error_reply, error_temp, error_perm, error_proto, \
! 	      socket.error, IOError, EOFError)
  
  
--- 57,70 ----
  
  # Exception raised when an error or invalid response is received
! class Error(Exception): pass
! class error_reply(Error): pass		# unexpected [123]xx reply
! class error_temp(Error): pass		# 4xx errors
! class error_perm(Error): pass		# 5xx errors
! class error_proto(Error): pass		# response does not begin with [1-5]
  
  
  # All exceptions (hopefully) that may be raised here and that aren't
  # (always) programming errors on our side
! all_errors = (Error, socket.error, IOError, EOFError)
  
  

Index: multifile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/multifile.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** multifile.py	2000/07/16 12:04:30	1.10
--- multifile.py	2000/08/17 05:06:49	1.11
***************
*** 31,35 ****
  import string
  
! Error = 'multifile.Error'
  
  class MultiFile:
--- 31,36 ----
  import string
  
! class Error(Exception):
! 	pass
  
  class MultiFile: