Merge "Remove unused variables"

This commit is contained in:
Jenkins 2016-12-10 16:13:20 +00:00 committed by Gerrit Code Review
commit 5a899b6091

View File

@ -224,7 +224,7 @@ class Uuid(object):
type_name = 'Uuid' type_name = 'Uuid'
@classmethod @classmethod
def validate(cls, value, default=None): def validate(cls, value):
if not uuidutils.is_uuid_like(value): if not uuidutils.is_uuid_like(value):
raise exception.InvalidUUID(uuid=value) raise exception.InvalidUUID(uuid=value)
return value return value
@ -273,7 +273,7 @@ class DateTime(object):
type_name = "DateTime" type_name = "DateTime"
@classmethod @classmethod
def validate(cls, value, default=None): def validate(cls, value):
if value is None: if value is None:
return return
elif isinstance(value, datetime.datetime): elif isinstance(value, datetime.datetime):
@ -286,7 +286,7 @@ class MemoryType(object):
type_name = 'MemoryType' type_name = 'MemoryType'
@classmethod @classmethod
def validate(cls, value, default=None): def validate(cls, value):
if value is None: if value is None:
return return
elif value.isdigit() and int(value) >= MIN_MEMORY_SIZE: elif value.isdigit() and int(value) >= MIN_MEMORY_SIZE:
@ -308,7 +308,7 @@ class ImageSize(object):
type_name = 'ImageSize' type_name = 'ImageSize'
@classmethod @classmethod
def validate(cls, value, default=None): def validate(cls, value):
if value is None: if value is None:
return return
elif value.isdigit(): elif value.isdigit():