Logo Search packages:      
Sourcecode: hellanzb version File versions  Download package

def Hellanzb::NZBLeecher::NZBLeecher::getBodyFailed (   self,
  err 
)

Handle a failure of the BODY command. Ensure the failed segment gets a 0 byte file
written to the filesystem when this occurs 

Definition at line 553 of file __init__.py.

00553                                 :
        """ Handle a failure of the BODY command. Ensure the failed segment gets a 0 byte file
        written to the filesystem when this occurs """
        debug(str(self) + ' get BODY FAILED, errno: ' + str(err) + ' for messageId: <' + \
              self.currentSegment.messageId + '> ' + self.currentSegment.getDestination() + \
              ' expected size: ' + str(self.currentSegment.bytes))
        self.gotResponseCode = False # for dataReceivedToFile
        self.lastChunk = ''
        
        code = extractCode(err)
        if code is not None:
            code, msg = code
            if code in (423, 430):
                try:
                    Hellanzb.queue.requeueMissing(self.factory.serverPoolName, self.currentSegment)
                    debug(str(self) + ' ' + self.currentSegment.nzbFile.showFilename + \
                          ' segment: ' + str(self.currentSegment.number) + \
                          ' Article is missing! Attempting to requeue on a different pool!')
                    Hellanzb.scroller.removeClient(self.currentSegment, self.factory.color)
                    self.resetCurrentSegment(removeEncFile = True)
                    reactor.callLater(0, self.fetchNextNZBSegment)
                    return
                
                except PoolsExhausted:
                    info(self.currentSegment.nzbFile.showFilename + ' segment: ' + \
                         str(self.currentSegment.number) + ' Article is missing!')

        if self.handle400Message(err):
            return
        self.finishedSegmentDownload()

    def handle400Message(self, err):


Generated by  Doxygen 1.6.0   Back to index