0

Make the rerenderprob value print a decent error since it does have to be between 0.0 and 1.0 instead of just

that it is a float.

Remove 0.0 and 1.0 as valid values
This commit is contained in:
Richard Pastrick
2012-05-01 10:59:57 -07:00
parent 6331200763
commit 5974919973
2 changed files with 4 additions and 4 deletions

View File

@@ -111,10 +111,10 @@ def validateNorthDirection(direction):
raise ValidationException("%r is not a valid north direction" % direction)
return intdir
def validateStochastic(s):
def validateRerenderprob(s):
val = float(s)
if val < 0 or val > 1:
raise ValidationException("%r is not a valid stochastic value. Should be between 0.0 and 1.0" % s)
if val =< 0 or val >= 1:
raise ValidationException("%r is not a valid rerender probability value. Should be between 0.0 and 1.0." % s)
return val
def validateImgFormat(fmt):