[ python-Bugs-1186900 ] nntplib shouldn't raise generic EOFError

SourceForge.net noreply at sourceforge.net
Wed Apr 20 21:52:52 CEST 2005


Bugs item #1186900, was opened at 2005-04-20 12:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1186900&group_id=5470

Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Matt Roper (mattrope)
Assigned to: Nobody/Anonymous (nobody)
Summary: nntplib shouldn't raise generic EOFError

Initial Comment:
Python's nntplib currently raises a generic EOFError if
the connection is closed unexpectedly.  This seems
inconsistent with other Python libraries (smtplib,
imaplib, etc.) and is unexpected behaviour.  It seems
that a new Exception class derived from the NNTPError
(e.g., NNTPConnectionError) should be used instead.

As it stands now, the only indication that EOFError can
be raised is in the docstring for the internal
getline() method.  There is no mention in the
documentation that higher level methods call getline()
and can raise the EOFError to the application level. 
If no new exception class is added for this situation,
it would be nice to have this behaviour noted in the
documentation.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1186900&group_id=5470


More information about the Python-bugs-list mailing list