(context)
Returns the failureNumber property or a default value if unspecified.
Returns the failureNumber property or a default value if unspecified.
Returns the failureNumber property or a default value if unspecified .
def _FailureNumber(context):
  """Returns the failureNumber property or a default value if unspecified."""
  number = context.properties.get('failureNumber', DEFAULT_FAILURE_NUMBER)
  try:
    number = int(number)
    if number < 1:
      raise PropertyError('failureNumber value must be greater than 0.')
    return number
  except ValueError:
    raise PropertyError('Invalid failureNumber value: {}'.format(number))
def _FailureNumber ( context ) : number = context . properties . get ( 'failureNumber' , DEFAULT_FAILURE_NUMBER ) try : number = int ( number ) if number < 1 : raise PropertyError ( 'failureNumber value must be greater than 0.' ) return number except ValueError : raise PropertyError ( 'Invalid failureNumber value: {}' . format ( number ) )