(self)
Do a rollover, as described in __init__().
Do a rollover, as described in __init__().
Do a rollover as described in __init__ () .
def doRollover(self):
        """
        Do a rollover, as described in __init__().
        """
        if self.stream:
            self.stream.close()
            self.stream = None
        if self.backupCount > 0:
            for i in range(self.backupCount - 1, 0, -1):
                sfn = self.rotation_filename("%s.%d" % (self.baseFilename, i))
                dfn = self.rotation_filename("%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.rotation_filename(self.baseFilename + ".1")
            if os.path.exists(dfn):
                os.remove(dfn)
            self.rotate(self.baseFilename, dfn)
        if not self.delay:
            self.stream = self._open()
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 = self . rotation_filename ( "%s.%d" % ( self . baseFilename , i ) ) dfn = self . rotation_filename ( "%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 . rotation_filename ( self . baseFilename + ".1" ) if os . path . exists ( dfn ) : os . remove ( dfn ) self . rotate ( self . baseFilename , dfn ) if not self . delay : self . stream = self . _open ( )