diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2014-06-19 17:48:03 -0400 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2014-06-20 15:55:07 -0400 |
| commit | 6bb64604f3422e1c4f72a14707bfb6ffbeb23458 (patch) | |
| tree | c17129614611c4ca95bed8c936cf86c033453816 /base/common/python/pki/key.py | |
| parent | ae94ccc0164c6e8bdf30a0946c3003438254d85d (diff) | |
| download | pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.tar.gz pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.tar.xz pki-6bb64604f3422e1c4f72a14707bfb6ffbeb23458.zip | |
Fixed NumberFormatException in key-request-find.
Previously if a key archival failed, the REST service would return
an invalid key URL, which would cause an exception when the CLI tried
to parse it. The service has been fixed to return a null URL which
can be detected to avoid parsing invalid value.
The Python library has been modified to handle missing key URL.
Ticket #1043
Diffstat (limited to 'base/common/python/pki/key.py')
| -rw-r--r-- | base/common/python/pki/key.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/common/python/pki/key.py b/base/common/python/pki/key.py index 337ae76ff..5a24c2a31 100644 --- a/base/common/python/pki/key.py +++ b/base/common/python/pki/key.py @@ -183,7 +183,10 @@ class KeyRequestInfo(object): key_request_info = cls() key_request_info.request_url = attr_list['requestURL'] key_request_info.request_type = attr_list['requestType'] - key_request_info.key_url = attr_list['keyURL'] + + if 'keyURL' in attr_list: + key_request_info.key_url = attr_list['keyURL'] + key_request_info.request_status = attr_list['requestStatus'] return key_request_info |
