#NEWLINE# def _load_file( self , root , path ) : #NEWLINE# #INDENT# f = open ( path ) #NEWLINE# content = f . read ( ) #NEWLINE# f . close ( ) #NEWLINE# ( content_type , _ ) = mimetypes . guess_type ( path , False ) #NEWLINE# if ( content_type is None ) : #NEWLINE# #INDENT# assert False , 'unknown content type' #NEWLINE# #UNINDENT# content_length = len ( content ) #NEWLINE# path = path [ len ( root ) : ] #NEWLINE# self . log . debug ( 'preloading %s => %d, %s' , path , content_length , content_type ) #NEWLINE# self . _map [ path ] = ( content , content_type , content_length )