summaryrefslogtreecommitdiffstats
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-11-26 09:17:19 (GMT)
committerGuido van Rossum <guido@python.org>1992-11-26 09:17:19 (GMT)
commit18fc5696c8be30b56485a20dc48f7f683b472f79 (patch)
tree97da7e7f67ca99491939ab379614cd64a4f51505 /Lib/nntplib.py
parentc89705d6975ffb1e4a3764f4f36bab339f969e8f (diff)
downloadcpython-18fc5696c8be30b56485a20dc48f7f683b472f79.zip
cpython-18fc5696c8be30b56485a20dc48f7f683b472f79.tar.gz
cpython-18fc5696c8be30b56485a20dc48f7f683b472f79.tar.bz2
* mainloop.py: added facility for calling select(). Also added
embryonic facility for pseudo-modal dialogs. * stdwinevents.py: added modifier masks for key/mouse events * renamed exceptions in nntplib.py * Changed string.join() to call string.joinfields() to profit of strop.joinfields()
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 18fa398..c448d48 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -4,7 +4,7 @@
# Example:
#
-# >>> from nntp import NNTP
+# >>> from nntplib import NNTP
# >>> s = NNTP().init('charon')
# >>> resp, count, first, last, name = s.group('nlnet.misc')
# >>> print 'Group', name, 'has', count, 'articles, range', first, 'to', last
@@ -32,12 +32,12 @@ import socket
import string
-# Exception raiseds when an error or invalid response is received
+# Exception raised when an error or invalid response is received
-error_reply = 'nntp.error_reply' # unexpected [123]xx reply
-error_function = 'nntp.error_function' # 4xx errors
-error_form = 'nntp.error_form' # 5xx errors
-error_protocol = 'nntp.error_protocol' # response does not begin with [1-5]
+error_reply = 'nntplib.error_reply' # unexpected [123]xx reply
+error_temp = 'nntplib.error_temp' # 4xx errors
+error_perm = 'nntplib.error_perm' # 5xx errors
+error_proto = 'nntplib.error_proto' # response does not begin with [1-5]
# Standard port used by NNTP servers
@@ -119,11 +119,11 @@ class NNTP:
if self.debugging: print '*resp*', `resp`
c = resp[:1]
if c == '4':
- raise error_function, resp
+ raise error_temp, resp
if c == '5':
- raise error_form, resp
+ raise error_perm, resp
if c not in '123':
- raise error_protocol, resp
+ raise error_proto, resp
return resp
# Internal: get a response plus following text from the server.
@@ -342,7 +342,7 @@ class NNTP:
def ihave(self, id, f):
resp = self.shortcmd('IHAVE ' + id)
- # Raises error_function if the server already has it
+ # Raises error_??? if the server already has it
if resp[0] <> '3':
raise error_reply, resp
while 1: