• Barry Warsaw's avatar
    Added new exception classes: · 9dd78729
    Barry Warsaw yazdı
        NNTPError - derived from Exception, it's the base class for all
        other exceptions in this module
    
        NNTPReplyError - what used to be error_reply
    
        NNTPTemporaryError - what used to be error_temp
    
        NNTPPermanentError - what used to be error_perm
    
        NNTPProtocolError - what used to be error_proto
    
        NNTPDataError - what used to be error_data
    
    All the old names are retained for backwards compatibility; they point
    to the class that replaces them.  Also, any code in this module that
    raises an exception, now does so with the exception class.
    
    NNTP.__init__(): Added a new optional argument `readermode', which is
    a flag that defaults to false.  When set to true, the "mode reader"
    command is sent to the NNTP server before user authentication.  Reader
    mode is sometimes necessary if you are connecting to an NNTP server on
    the local machine and intend to call reader-specific comamnds, such as
    `group'.  If you get unexpected NNTPPermanentErrors, you might need to
    set readermode.  Patch provided by Thomas Wouters (who include the
    standard disclaimer on is patches@python.org submission), and inspired
    by Jim Tittsler.
    9dd78729
nntplib.py 14 KB