parameters: (self)
docstring: Do a rollover, as described in __init__().
docstring_summary: Do a rollover, as described in __init__().
docstring_tokens: Do a rollover as described in __init__ () .
function: 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()
function_tokens: 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 ( )