#NEWLINE# def locateChild( self , ctx , segments ) : #NEWLINE# #INDENT# '\n        Retrieve wrapped child resources via the underlying resource.\n        ' #NEWLINE# def _cbWrapChild( result ) : #NEWLINE# #INDENT# if ( result in [ NotFound , errorMarker ] ) : #NEWLINE# #INDENT# return result #NEWLINE# #UNINDENT# if isinstance ( result , tuple ) : #NEWLINE# #INDENT# ( res , segments ) = result #NEWLINE# if isinstance ( res , Deferred ) : #NEWLINE# #INDENT# return res . addCallback ( ( lambda res : _cbWrapChild ( ( res , segments ) ) ) ) #NEWLINE# #UNINDENT# return ( type ( self ) ( IResource ( res ) ) , segments ) #NEWLINE# #UNINDENT# raise ValueError ( ( 'Broken resource; locateChild returned %r' % ( result , ) ) ) #NEWLINE# #UNINDENT# return maybeDeferred ( self . underlying . locateChild , ctx , segments ) . addCallback ( self )