#NEWLINE# def load( self ) : #NEWLINE# #INDENT# db = self . _connect ( ) #NEWLINE# self . log . info ( 'connected to {} database' . format ( db . name ) ) #NEWLINE# conf_doc = self . _grab_doc ( db ) #NEWLINE# self . log . info ( 'got {} document' . format ( conf_doc . name ) ) #NEWLINE# context = conf_doc . find_one ( { #NEWLINE# #INDENT# 'id' : self . conf_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( not context ) : #NEWLINE# #INDENT# raise LoadContextFailed ( driver = __name__ , reason = 'document {} not found' . format ( self . conf_id ) ) #NEWLINE# #UNINDENT# return context