python: Fix key_export*.

* lang/python/src/core.py (key_export): Just raise an error.
(key_export_minimal, key_export_secret): Ditto.

--

GnuPG-bug-id: 5149
Fixes-commit: 7faef33d13
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-12-03 11:35:24 +09:00
parent 53ac732bae
commit 7a4fe82a01

View File

@ -637,7 +637,7 @@ class Context(GpgmeWrapper):
data.seek(0, os.SEEK_SET)
pk_result = data.read()
except GPGMEError as e:
pk_result = e
raise e
if len(pk_result) > 0:
result = pk_result
@ -672,7 +672,7 @@ class Context(GpgmeWrapper):
data.seek(0, os.SEEK_SET)
pk_result = data.read()
except GPGMEError as e:
pk_result = e
raise e
if len(pk_result) > 0:
result = pk_result
@ -713,7 +713,7 @@ class Context(GpgmeWrapper):
data.seek(0, os.SEEK_SET)
sk_result = data.read()
except GPGMEError as e:
sk_result = e
raise e
if len(sk_result) > 0:
result = sk_result