#NEWLINE# def doRollover( self ) : #NEWLINE# #INDENT# '\n        Do a rollover, as described in __init__().\n        ' #NEWLINE# if self . stream : #NEWLINE# #INDENT# self . stream . close ( ) #NEWLINE# self . stream = None #NEWLINE# #UNINDENT# if ( self . backupCount > 0 ) : #NEWLINE# #INDENT# for i in range ( ( self . backupCount - 1 ) , 0 , ( - 1 ) ) : #NEWLINE# #INDENT# sfn = ( '%s.%d' % ( self . baseFilename , i ) ) #NEWLINE# dfn = ( '%s.%d' % ( self . baseFilename , ( i + 1 ) ) ) #NEWLINE# if os . path . exists ( sfn ) : #NEWLINE# #INDENT# if os . path . exists ( dfn ) : #NEWLINE# #INDENT# os . remove ( dfn ) #NEWLINE# #UNINDENT# os . rename ( sfn , dfn ) #NEWLINE# #UNINDENT# #UNINDENT# dfn = ( self . baseFilename + '.1' ) #NEWLINE# if os . path . exists ( dfn ) : #NEWLINE# #INDENT# os . remove ( dfn ) #NEWLINE# #UNINDENT# os . rename ( self . baseFilename , dfn ) #NEWLINE# #UNINDENT# self . mode = 'w' #NEWLINE# self . stream = self . _open ( )