Skip to content

Commit db18a65

Browse files
Fixed OpenPGP support for modern versions of libgpgme.
1 parent 9835f62 commit db18a65

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Features:
1919

2020
Fixed:
2121

22+
- Fixed OpenPGP support for modern versions of libgpgme. (Bernhard Reiter)
2223
- Restored compatibility with old style trackers (anatoly techtonik)
2324
- Make roundup play nice with setup tools (for using with virtualenv)
2425
(Pradip Caulagi)

roundup/roundupdb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242

4343
try:
4444
import pyme, pyme.core
45+
# gpgme_check_version() must have been called once in a programm
46+
# to initialise some subsystems of gpgme.
47+
# See the gpgme documentation (at least from v1.1.6 to 1.3.1, e.g.
48+
# http://gnupg.org/documentation/manuals/gpgme/Library-Version-Check.html)
49+
# This is not done by pyme (at least v0.7.0 - 0.8.1). So we do it here.
50+
# FIXME: Make sure it is done only once (the gpgme documentation does
51+
# not tell if calling this several times has drawbacks).
52+
pyme.core.check_version(None)
4553
except ImportError:
4654
pyme = None
4755

test/gpgmelib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@
120120
def setUpPGP():
121121
os.mkdir(pgphome)
122122
os.environ['GNUPGHOME'] = pgphome
123+
# gpgme_check_version() must have been called once in a programm
124+
# to initialise some subsystems of gpgme. See roundup/roundupdb.py.
123125
ctx = pyme.core.Context()
124126
key = pyme.core.Data(pgp_test_key)
125127
ctx.op_import(key)

0 commit comments

Comments
 (0)