diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-20 12:34:17 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-20 12:34:17 -0300 |
commit | 610584e76735e3accda05d95facbe33479cb1395 (patch) | |
tree | 937b105f60ad8215324f357b457e4492908e7848 /keymanager | |
parent | 4c310ee3df8765b3df56b46e5837f5e332447c3d (diff) | |
parent | cbaf583dc68661fe4f0cc9ee9aedde6d6ec0de9a (diff) |
Merge remote-tracking branch 'refs/remotes/ivan/feature/better-version-handling' into develop
Diffstat (limited to 'keymanager')
-rw-r--r-- | keymanager/changes/feature-use-better-version-handler | 1 | ||||
-rw-r--r-- | keymanager/src/leap/keymanager/__init__.py | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/keymanager/changes/feature-use-better-version-handler b/keymanager/changes/feature-use-better-version-handler new file mode 100644 index 00000000..57fabcc3 --- /dev/null +++ b/keymanager/changes/feature-use-better-version-handler @@ -0,0 +1 @@ + o Use a better version handler for the gnupg version check. diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py index aa4e2e72..4edcdd0c 100644 --- a/keymanager/src/leap/keymanager/__init__.py +++ b/keymanager/src/leap/keymanager/__init__.py @@ -23,9 +23,9 @@ import sys try: from gnupg.gnupg import GPGUtilities assert(GPGUtilities) # pyflakes happy - from gnupg import __version__ - from distutils.version import LooseVersion as V - assert(V(__version__) >= V('1.2.3')) + from gnupg import __version__ as _gnupg_version + from pkg_resources import parse_version + assert(parse_version(_gnupg_version) >= parse_version('1.2.3')) except (ImportError, AssertionError): print "*******" |