#NEWLINE# def Render( self , args , token = None ) : #NEWLINE# #INDENT# 'Creates a new hunt.' #NEWLINE# args . hunt_runner_args . hunt_name = 'GenericHunt' #NEWLINE# with implementation . GRRHunt . StartHunt ( runner_args = args . hunt_runner_args , args = args . hunt_args , token = token ) as hunt : #NEWLINE# #INDENT# logging . info ( 'User %s created a new %s hunt (%s)' , token . username , token . state . args . flow_runner_args . flow_name , hunt . urn ) #NEWLINE# return dict ( status = 'OK' , hunt_id = api_value_renderers . RenderValue ( hunt . urn ) , hunt_args = api_value_renderers . RenderValue ( hunt . state . args ) , hunt_runner_args = api_value_renderers . RenderValue ( hunt . runner . args ) )