def jenkins_info_from_response(project):
 if project.get('inQueue', False):
  return (JenkinsResults.RUNNING, {})
 if ('builds' not in project):
  return (JenkinsResults.UNKNOWN, {})
 if (len(project['builds']) < 1):
  return (JenkinsResults.NOTRUN, {})
 result = jenkins_result_from_api(project['builds'][0]['result'])
 return (result, properties_to_params(project['property']))

def jenkins_info_from_response ( project ) : if project . get ( 'inQueue' , False ) : return ( JenkinsResults . RUNNING , { } ) if ( 'builds' not in project ) : return ( JenkinsResults . UNKNOWN , { } ) if ( len ( project [ 'builds' ] ) < 1 ) : return ( JenkinsResults . NOTRUN , { } ) result = jenkins_result_from_api ( project [ 'builds' ] [ 0 ] [ 'result' ] ) return ( result , properties_to_params ( project [ 'property' ] ) )
get the jenkins job information from the jenkins api response .