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