nntp/nntp.py
def body(self, msgid_article=None, decode=False):
        """BODY command.
        """
        args = None
        if msgid_article is not None:
            args = utils.unparse_msgid_article(msgid_article)

        code, message = self.command("BODY", args)
        if code != 222:
            raise NNTPReplyError(code, message)

        escape = 0
        crc32 = 0

        body = []
        for line in self.info_gen(code, message):

            # decode body if required
            if decode:
                if line.startswith("=y"):
                    continue
                line, escape, crc32 = yenc.decode(line, escape, crc32)

            # body
            body.append(line)

        return "".join(body)
def body(self, msgid_article=None, decode=False):
        args = None
        if msgid_article is not None:
            args = utils.unparse_msgid_article(msgid_article)

        code, message = self.command("BODY", args)
        if code != 222:
            raise NNTPReplyError(code, message)

        escape = 0
        crc32 = 0

        body = []
        for line in self.info_gen(code, message):

            # decode body if required
            if decode:
                if line.startswith("=y"):
                    continue
                line, escape, crc32 = yenc.decode(line, escape, crc32)

            # body
            body.append(line)

        return "".join(body)
def body ( self , msgid_article = None , decode = False ) : args = None if msgid_article is not None : args = utils . unparse_msgid_article ( msgid_article ) code , message = self . command ( "BODY" , args ) if code != 222 : raise NNTPReplyError ( code , message ) escape = 0 crc32 = 0 body = [ ] for line in self . info_gen ( code , message ) : # decode body if required if decode : if line . startswith ( "=y" ) : continue line , escape , crc32 = yenc . decode ( line , escape , crc32 ) # body body . append ( line ) return "" . join ( body )
BODY command.
BODY command .