#NEWLINE# def get( self ) : #NEWLINE# #INDENT# request_id = self . request . get ( 'request_id' ) #NEWLINE# request_stats = RequestStats . get ( request_id ) #NEWLINE# if ( not request_stats ) : #NEWLINE# #INDENT# self . response . out . write ( 'Profiler stats no longer exist for this request.' ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( not ( 'raw_stats' in request_stats . profiler_results ) ) : #NEWLINE# #INDENT# self . response . out . write ( 'No raw states available for this profile' ) #NEWLINE# return #NEWLINE# #UNINDENT# self . response . headers [ 'Content-Disposition' ] = ( 'attachment; filename="g-m-p-%s.profile"' % str ( request_id ) ) #NEWLINE# self . response . headers [ 'Content-type' ] = 'application/octet-stream' #NEWLINE# self . response . out . write ( base64 . b64decode ( request_stats . profiler_results [ 'raw_stats' ] ) )