]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added all_errors, list of all possible exceptions.
authorGuido van Rossum <guido@python.org>
Fri, 6 Nov 1992 13:34:17 +0000 (13:34 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 6 Nov 1992 13:34:17 +0000 (13:34 +0000)
Lib/ftplib.py

index ed588b5570ddabfcbfa9fc3765d6aa455363a7fc..8423df6d8ca7ec7954f21bfc4f87c8e058032c15 100644 (file)
@@ -36,13 +36,19 @@ import string
 FTP_PORT = 21
 
 
-# Exception raiseds when an error or invalid response is received
+# 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)
+
+
 # Line terminators (we always output CRLF, but accept any of CRLF, CR, LF)
 CRLF = '\r\n'