(self)
return result
Determine the files to delete when rolling over.

        More specific than the earlier method, which just used glob.glob().
Determine the files to delete when rolling over.
Determine the files to delete when rolling over .
def getFilesToDelete(self):
        """
        Determine the files to delete when rolling over.

        More specific than the earlier method, which just used glob.glob().
        """
        dirName, baseName = os.path.split(self.baseFilename)
        fileNames = os.listdir(dirName)
        result = []
        # See bpo-44753: Don't use the extension when computing the prefix.
        prefix = os.path.splitext(baseName)[0] + "."
        plen = len(prefix)
        for fileName in fileNames:
            if fileName[:plen] == prefix:
                suffix = fileName[plen:]
                # See bpo-45628: The date/time suffix could be anywhere in the
                # filename
                parts = suffix.split('.')
                for part in parts:
                    if self.extMatch.match(part):
                        result.append(os.path.join(dirName, fileName))
                        break
        if len(result) < self.backupCount:
            result = []
        else:
            result.sort()
            result = result[:len(result) - self.backupCount]
        return result
def getFilesToDelete ( self ) : dirName , baseName = os . path . split ( self . baseFilename ) fileNames = os . listdir ( dirName ) result = [ ] # See bpo-44753: Don't use the extension when computing the prefix. prefix = os . path . splitext ( baseName ) [ 0 ] + "." plen = len ( prefix ) for fileName in fileNames : if fileName [ : plen ] == prefix : suffix = fileName [ plen : ] # See bpo-45628: The date/time suffix could be anywhere in the # filename parts = suffix . split ( '.' ) for part in parts : if self . extMatch . match ( part ) : result . append ( os . path . join ( dirName , fileName ) ) break if len ( result ) < self . backupCount : result = [ ] else : result . sort ( ) result = result [ : len ( result ) - self . backupCount ] return result