mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
debian/lib/python/debian_linux/config.py: Fix undefined exception type
SchemaItemBoolean and SchemaItemInteger attempt to raise an exception of type Error when given invalid input, but this type has never been defined. Use ValueError instead.
This commit is contained in:
7
debian/lib/python/debian_linux/config.py
vendored
7
debian/lib/python/debian_linux/config.py
vendored
@@ -21,15 +21,12 @@ class SchemaItemBoolean(object):
|
||||
return True
|
||||
if i in ("false", "0"):
|
||||
return False
|
||||
raise Error
|
||||
raise ValueError
|
||||
|
||||
|
||||
class SchemaItemInteger(object):
|
||||
def __call__(self, i):
|
||||
try:
|
||||
return int(i.strip(), 0)
|
||||
except ValueError:
|
||||
raise Error
|
||||
return int(i.strip(), 0)
|
||||
|
||||
|
||||
class SchemaItemList(object):
|
||||
|
||||
Reference in New Issue
Block a user