#NEWLINE# def _simple_serve( context , request ) : #NEWLINE# #INDENT# ' Service /simple with fallback=none ' #NEWLINE# normalized_name = normalize_name ( context . name ) #NEWLINE# if ( not request . access . has_permission ( normalized_name , 'read' ) ) : #NEWLINE# #INDENT# if request . is_logged_in : #NEWLINE# #INDENT# return HTTPNotFound ( ( 'No packages found named %r' % normalized_name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return request . request_login ( ) #NEWLINE# #UNINDENT# #UNINDENT# packages = request . db . all ( normalized_name ) #NEWLINE# return _pkg_response ( packages_to_dict ( request , packages ) )