Message222958
diff -r 8f85262fbe8a Lib/nntplib.py
--- a/Lib/nntplib.py Sun Jul 06 02:24:24 2014 -0400
+++ b/Lib/nntplib.py Thu Jul 10 16:10:38 2014 -0700
@@ -122,6 +122,9 @@
"""Error in response data"""
pass
+class NNTPConnectError(NNTPError):
+ """Error during connection establishment."""
+ pass
Could you also document the new exception? (See Doc/library/nntplib.rst and please add a versionadded directive)
The pass statement is redundant, but we could keep it to be consistent with rest of the library.
@@ -435,7 +438,7 @@
raise NNTPDataError('line too long')
if self.debugging > 1:
print('*get*', repr(line))
- if not line: raise EOFError
+ if not line: raise NNTPConnectError()
if not line:
raise NNTPConnectError
looks more readable to me.
Also, you could add a more descriptive error message. |
|
Date |
User |
Action |
Args |
2014-07-13 17:56:23 | berker.peksag | set | recipients:
+ berker.peksag, mattrope, jesstess, Ankur.Ankan, Lita.Cho |
2014-07-13 17:56:23 | berker.peksag | set | messageid: <1405274183.07.0.164958999594.issue1186900@psf.upfronthosting.co.za> |
2014-07-13 17:56:23 | berker.peksag | link | issue1186900 messages |
2014-07-13 17:56:22 | berker.peksag | create | |
|