diff options
author | Werner Koch <[email protected]> | 2020-07-14 12:46:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-07-14 12:48:01 +0000 |
commit | 32b80cf3c7d278ddf27117617a3e95e4a12c28c8 (patch) | |
tree | f9e1e025bc78cdfb8280e4d639096b097fde420a /lang/python/tests/support.py | |
parent | doc: Explain verify_result_t.status == 0 more (diff) | |
download | gpgme-32b80cf3c7d278ddf27117617a3e95e4a12c28c8.tar.gz gpgme-32b80cf3c7d278ddf27117617a3e95e4a12c28c8.zip |
python: Workaround for a regression in GnuPG 2.2.21
* lang/python/tests/support.py (is_gpg_version): New.
* lang/python/tests/t-encrypt-sym.py: Add workaround.
--
GnuPG-bug-id: 4991
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'lang/python/tests/support.py')
-rw-r--r-- | lang/python/tests/support.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py index 37fdba9b..dc42a361 100644 --- a/lang/python/tests/support.py +++ b/lang/python/tests/support.py @@ -38,6 +38,12 @@ def assert_gpg_version(version=(2, 1, 0)): c.engine_info.version, '.'.join(map(str, version)))) sys.exit(77) +def is_gpg_version(version): + with gpg.Context() as c: + clean_version = re.match(r'\d+\.\d+\.\d+', + c.engine_info.version).group(0) + return tuple(map(int, clean_version.split('.'))) == version + def have_tofu_support(ctx, some_uid): keys = list( |