Exemple #1
0
 def connectionLost(self, reason):
     NNTPClient.connectionLost(self) # calls self.factory.clientConnectionLost(self, reason)
     
     self.activeGroups = []
     self.factory.clients.remove(self)
     self.isLoggedIn = False
     self.setReaderAfterLogin = False
Exemple #2
0
    def connectionLost(self, reason):
        NNTPClient.connectionLost(
            self)  # calls self.factory.clientConnectionLost(self, reason)

        self.activeGroups = []
        self.factory.clients.remove(self)
        self.isLoggedIn = False
        self.setReaderAfterLogin = False
Exemple #3
0
    def connectionMade(self):
        NNTPClient.connectionMade(self)

        # 'mode reader' is sometimes necessary to enable 'reader' mode.
        # However, the order in which 'mode reader' and 'authinfo' need to
        # arrive differs between some NNTP servers. Try to send
        # 'mode reader', and if it fails with an authorization failed
        # error, try again after sending authinfo.
        self.setReader()
Exemple #4
0
    def connectionMade(self):
        NNTPClient.connectionMade(self)

        # 'mode reader' is sometimes necessary to enable 'reader' mode.
        # However, the order in which 'mode reader' and 'authinfo' need to
        # arrive differs between some NNTP servers. Try to send
        # 'mode reader', and if it fails with an authorization failed
        # error, try again after sending authinfo.
        self.setReader()
Exemple #5
0
    def __init__(self, username, password):
        """ """
        NNTPClient.__init__(self)
        self.username = username
        self.password = password
        self.id = self.getNextId()

        # successful GROUP commands during this session
        self.activeGroups = []
        self.activatedGroups = False

        # current article (<segment>) we're dealing with
        self.currentSegment = None

        self.isLoggedIn = False
        self.setReaderAfterLogin = False

        # I'm not sure why this needs to be raised from the default value -- but we can
        # definitely get longer lines than LineReceiver expects
        self.MAX_LENGTH = 262144

        self.CRUFT = """
Exemple #6
0
    def __init__(self, username, password):
        """ """
        NNTPClient.__init__(self)
        self.username = username
        self.password = password
        self.id = self.getNextId()

        # successful GROUP commands during this session
        self.activeGroups = []
        self.activatedGroups = False

        # current article (<segment>) we're dealing with
        self.currentSegment = None

        self.isLoggedIn = False
        self.setReaderAfterLogin = False


        # I'm not sure why this needs to be raised from the default value -- but we can
        # definitely get longer lines than LineReceiver expects
        self.MAX_LENGTH = 262144
        
        self.CRUFT = """
Exemple #7
0
 def fetchBody(self, index):
     """ """
     #reactor.callLater(0, NNTPClient.fetchBody, self, '<' + index + '>')
     NNTPClient.fetchBody(self, '<' + index + '>')
Exemple #8
0
 def fetchBody(self, index):
     """ """
     #reactor.callLater(0, NNTPClient.fetchBody, self, '<' + index + '>')
     NNTPClient.fetchBody(self, '<' + index + '>')