def validate_timeout_or_zero(option, value):
 if (value is None):
  raise ConfigurationError(('%s cannot be None' % (option,)))
 if ((value == 0) or (value == '0')):
  return 0
 return (validate_positive_float(option, value) / 1000.0)

def validate_timeout_or_zero ( option , value ) : if ( value is None ) : raise ConfigurationError ( ( '%s cannot be None' % ( option , ) ) ) if ( ( value == 0 ) or ( value == '0' ) ) : return 0 return ( validate_positive_float ( option , value ) / 1000.0 )
validates a timeout specified in milliseconds returning a value in floating point seconds for the case where none is an error and 0 is valid .