def jenkins_result_from_api(result):
 if (result is None):
  return JenkinsResults.RUNNING
 elif (result in ['FAILURE', 'ABORTED']):
  return JenkinsResults.FAILED
 elif (result == 'SUCCESS'):
  return JenkinsResults.PASSED
 else:
  raise AssertionError("Don't know how to handle Jenkins result {}".format(result))

def jenkins_result_from_api ( result ) : if ( result is None ) : return JenkinsResults . RUNNING elif ( result in [ 'FAILURE' , 'ABORTED' ] ) : return JenkinsResults . FAILED elif ( result == 'SUCCESS' ) : return JenkinsResults . PASSED else : raise AssertionError ( "Don't know how to handle Jenkins result {}" . format ( result ) )
convert a jenkins job result in to a value from jenkinsresults .