2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-18 01:03:49 +00:00

Modify KmipOperationFailure to expose status/reason/message attributes

This commit is contained in:
Hao Shen
2017-04-04 11:36:05 -07:00
parent 2aabad714a
commit 16d79283f2
2 changed files with 10 additions and 3 deletions

View File

@@ -39,7 +39,8 @@ class KmipOperationFailure(Exception):
"""
def __init__(self, status, reason, message):
"""
Construct the error message for the KMIP operation failure.
Construct the error message and attributes for the KMIP operation
failure.
Args:
status: a ResultStatus enumeration
@@ -48,3 +49,6 @@ class KmipOperationFailure(Exception):
"""
msg = "{0}: {1} - {2}".format(status.name, reason.name, message)
super(KmipOperationFailure, self).__init__(msg)
self.status = status
self.reason = reason
self.message = message