#NEWLINE# def flush( self ) : #NEWLINE# #INDENT# 'Flushes the channel database to its file.' #NEWLINE# if ( not self . noFlush ) : #NEWLINE# #INDENT# if ( self . filename is not None ) : #NEWLINE# #INDENT# fd = utils . file . AtomicFile ( c . filename ) #NEWLINE# for ( channel , c ) in self . channels . items ( ) : #NEWLINE# #INDENT# fd . write ( ( 'channel %s' % channel ) ) #NEWLINE# fd . write ( os . linesep ) #NEWLINE# c . preserve ( fd , indent = '  ' ) #NEWLINE# #UNINDENT# fd . close ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log . warning ( 'ChannelsDictionary.flush without self.filename.' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# log . debug ( 'Not flushing ChannelsDictionary because of noFlush.' )