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