#NEWLINE# def RenderNonFiltered( self , args , token ) : #NEWLINE# #INDENT# fd = aff4 . FACTORY . Open ( 'aff4:/hunts' , mode = 'r' , token = token ) #NEWLINE# children = list ( fd . ListChildren ( ) ) #NEWLINE# total_count = len ( children ) #NEWLINE# children . sort ( key = operator . attrgetter ( 'age' ) , reverse = True ) #NEWLINE# if args . count : #NEWLINE# #INDENT# children = children [ args . offset : ( args . offset + args . count ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# children = children [ args . offset : ] #NEWLINE# #UNINDENT# hunt_list = [ ] #NEWLINE# for hunt in fd . OpenChildren ( children = children ) : #NEWLINE# #INDENT# if ( ( not isinstance ( hunt , hunts . GRRHunt ) ) or ( not hunt . state ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# hunt_list . append ( hunt ) #NEWLINE# #UNINDENT# return ApiListHuntsResult ( total_count = total_count , items = self . _RenderHuntList ( hunt_list ) )