'Do a rollover, as described in __init__().'

def doRollover(self):

    if self.stream:
        self.stream.close()
        self.stream = None
    if (self.backupCount > 0):
        for i in range((self.backupCount - 1), 0, (-1)):
            sfn = ('%s.%d' % (self.baseFilename, i))
            dfn = ('%s.%d' % (self.baseFilename, (i + 1)))
            if os.path.exists(sfn):
                if os.path.exists(dfn):
                    os.remove(dfn)
                os.rename(sfn, dfn)
        dfn = (self.baseFilename + '.1')
        if os.path.exists(dfn):
            os.remove(dfn)
        if os.path.exists(self.baseFilename):
            os.rename(self.baseFilename, dfn)
    if (not self.delay):
        self.stream = self._open()
