diff options
author | Guido van Rossum <guido@python.org> | 1992-11-06 13:34:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-11-06 13:34:17 (GMT) |
commit | 21974798ced0eafef0b331a69f96222400859232 (patch) | |
tree | b745fd58ace7674736399e5bc363c4e9ac1ce24f | |
parent | c68a40183b2f66c7034b2a68c1b7042527ea36a2 (diff) | |
download | cpython-21974798ced0eafef0b331a69f96222400859232.zip cpython-21974798ced0eafef0b331a69f96222400859232.tar.gz cpython-21974798ced0eafef0b331a69f96222400859232.tar.bz2 |
Added all_errors, list of all possible exceptions.
-rw-r--r-- | Lib/ftplib.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index ed588b5..8423df6 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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' |