[Pkg-gnupg-commit] [gpgme] 105/132: python: Fix version check.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 26 01:01:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit 57e64d019d993fdeb4323def5352f8ecc98c6fd9
Author: Justus Winter <justus at g10code.com>
Date: Mon Mar 20 16:53:29 2017 +0100
python: Fix version check.
* lang/python/tests/support.py (assert_gpg_version): Cope with
non-released versions.
Fixes-commit: e1cf8bab319ba1dea41ba5d711dbb66ffd8e6fd6
Signed-off-by: Justus Winter <justus at g10code.com>
---
lang/python/tests/support.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py
index 8f9d645..611986b 100644
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -22,13 +22,15 @@ import contextlib
import shutil
import sys
import os
+import re
import tempfile
import time
import gpg
def assert_gpg_version(version=(2, 1, 0)):
with gpg.Context() as c:
- if tuple(map(int, c.engine_info.version.split('.'))) < version:
+ clean_version = re.match(r'\d+\.\d+\.\d+', c.engine_info.version).group(0)
+ if tuple(map(int, clean_version.split('.'))) < version:
print("GnuPG too old: have {0}, need {1}.".format(
c.engine_info.version, '.'.join(version)))
sys.exit(77)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list