diff options
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 41c3b33..a15c412 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -56,16 +56,16 @@ FTP_PORT = 21 # 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] +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_reply, error_temp, error_perm, error_proto, \ - socket.error, IOError, EOFError) +all_errors = (Error, socket.error, IOError, EOFError) # Line terminators (we always output CRLF, but accept any of CRLF, CR, LF) |