#NEWLINE# def open( self , out , source_path , **kw ) : #NEWLINE# #INDENT# if ( self . ctx . debug and ( not self . run_in_debug ) ) : #NEWLINE# #INDENT# with open ( base , 'rb' ) as fp : #NEWLINE# #INDENT# out . write ( fp . read ( ) ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# name = kw . get ( 'source' ) #NEWLINE# if ( not name ) : #NEWLINE# #INDENT# base = path . abspath ( self . baseUrl ) #NEWLINE# name = path . abspath ( source_path ) #NEWLINE# if ( not name . startswith ( base ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'requested AMD script "%s" does not exist in baseUrl "%s"' % ( source_path , self . baseUrl ) ) ) #NEWLINE# #UNINDENT# name = name [ ( len ( base ) + 1 ) : ] #NEWLINE# #UNINDENT# kw [ 'modname' ] = path . splitext ( name ) [ 0 ] #NEWLINE# return super ( RequireJSFilter , self ) . open ( out , source_path , ** kw )