#NEWLINE# def getDb( self , channel ) : #NEWLINE# #INDENT# 'Use this to get a database for a specific channel.' #NEWLINE# currentThread = threading . currentThread ( ) #NEWLINE# if ( ( channel not in self . dbCache ) and ( currentThread == world . mainThread ) ) : #NEWLINE# #INDENT# self . dbCache [ channel ] = self . makeDb ( self . makeFilename ( channel ) ) #NEWLINE# #UNINDENT# if ( currentThread != world . mainThread ) : #NEWLINE# #INDENT# db = self . makeDb ( self . makeFilename ( channel ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# db = self . dbCache [ channel ] #NEWLINE# #UNINDENT# db . isolation_level = None #NEWLINE# return self