mirror of https://github.com/OpenKMIP/PyKMIP.git
Fixed typos
This commit is contained in:
parent
aa300b256c
commit
ceaff6d7ac
|
@ -86,20 +86,21 @@ class Name(Struct):
|
|||
|
||||
def __validate(self):
|
||||
name = self.__class__.__name__
|
||||
msg = ErrorStrings.BAD_EXP_RECV
|
||||
if self.name_value and \
|
||||
not isinstance(self.name_value, Name.NameValue) and \
|
||||
not isinstance(self.name_value, str):
|
||||
member = 'name_value'
|
||||
raise TypeError(msg.format('{}.{}'.format(name, member),
|
||||
'name_value', type(Name.NameValue),
|
||||
type(name_type)))
|
||||
'name_value', type(Name.NameValue),
|
||||
type(self.name_value)))
|
||||
if self.name_type and \
|
||||
not isinstance(self.name_type, Name.NameType) and \
|
||||
not isinstance(self.name_type, str):
|
||||
member = 'name_type'
|
||||
raise TypeError(msg.format('{}.{}'.format(name, member),
|
||||
'name_type', type(Name.NameType),
|
||||
type(self.name_type)))
|
||||
'name_type', type(Name.NameType),
|
||||
type(self.name_type)))
|
||||
|
||||
@classmethod
|
||||
def create(cls, name_value, name_type):
|
||||
|
|
|
@ -265,7 +265,7 @@ class KMIPImpl(KMIP):
|
|||
object_group_member, attributes)
|
||||
return LocateResult(ResultStatus(RS.SUCCESS), uuids=uuids)
|
||||
except NotImplementedError:
|
||||
msg = ResultMessage('Locate Operation Not Supported'))
|
||||
msg = ResultMessage('Locate Operation Not Supported')
|
||||
reason = ResultReason(ResultReasonEnum.OPERATION_NOT_SUPPORTED)
|
||||
return LocateResult(ResultStatus(RS.OPERATION_FAILED),
|
||||
result_reason=reason,
|
||||
|
|
|
@ -525,5 +525,5 @@ class TestKMIPServer(TestCase):
|
|||
|
||||
attrs = [nameattr]
|
||||
res = self.kmip.locate(attributes=attrs)
|
||||
self.assertEqual(ResultStatus.SUCCESS, res.result_status.enum,
|
||||
self.assertEqual(ResultStatus.OPERATION_FAILED, res.result_status.enum,
|
||||
'locate result status did not return success')
|
||||
|
|
Loading…
Reference in New Issue