Add integer type to config schema
svn path=/dists/trunk/linux/; revision=22182
This commit is contained in:
parent
cc3a45c0d1
commit
ae85b67cf6
|
@ -27,6 +27,14 @@ class SchemaItemBoolean(object):
|
|||
raise Error
|
||||
|
||||
|
||||
class SchemaItemInteger(object):
|
||||
def __call__(self, i):
|
||||
try:
|
||||
return int(i.strip(), 0)
|
||||
except ValueError:
|
||||
raise Error
|
||||
|
||||
|
||||
class SchemaItemList(object):
|
||||
def __init__(self, type="\s+"):
|
||||
self.type = type
|
||||
|
|
Loading…
Reference in New Issue