conftypes: Fix minint/maxint validation in PercList.
This commit is contained in:
parent
8402aa051a
commit
4dd4b465e2
@ -486,12 +486,12 @@ class PercOrInt(BaseType):
|
|||||||
intval = int(value)
|
intval = int(value)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ValidationError(value, "must be integer or percentage!")
|
raise ValidationError(value, "must be integer or percentage!")
|
||||||
if self.minint is not None and intval < self.minint:
|
if self.minint is not None and intval < self.minint:
|
||||||
raise ValidationError(value, "must be {} or bigger!".format(
|
raise ValidationError(value, "must be {} or bigger!".format(
|
||||||
self.minint))
|
self.minint))
|
||||||
if self.maxint is not None and intval > self.maxint:
|
if self.maxint is not None and intval > self.maxint:
|
||||||
raise ValidationError(value, "must be {} or smaller!".format(
|
raise ValidationError(value, "must be {} or smaller!".format(
|
||||||
self.maxint))
|
self.maxint))
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseType):
|
class Command(BaseType):
|
||||||
|
Loading…
Reference in New Issue
Block a user