diff roundup/roundupdb.py @ 4745:ef4f1cefac9c

Fixed OpenPGP support for modern versions of libgpgme.
author Bernhard Reiter <bernhard@intevation.de>
date Thu, 17 Jan 2013 22:15:05 +0100
parents 9cc6d463cfbe
children 010ce624b320
line wrap: on
line diff
--- a/roundup/roundupdb.py	Thu Jan 17 21:28:17 2013 +0100
+++ b/roundup/roundupdb.py	Thu Jan 17 22:15:05 2013 +0100
@@ -42,6 +42,14 @@
 
 try:
     import pyme, pyme.core
+    # gpgme_check_version() must have been called once in a programm
+    # to initialise some subsystems of gpgme.
+    # See the gpgme documentation (at least from v1.1.6 to 1.3.1, e.g.
+    # http://gnupg.org/documentation/manuals/gpgme/Library-Version-Check.html)
+    # This is not done by pyme (at least v0.7.0 - 0.8.1). So we do it here.
+    # FIXME: Make sure it is done only once (the gpgme documentation does
+    # not tell if calling this several times has drawbacks).
+    pyme.core.check_version(None)
 except ImportError:
     pyme = None
 

Roundup Issue Tracker: http://roundup-tracker.org/