gpg: Disable use of incompatible library 'gnupg'.

This commit is contained in:
Valentin Lorentz 2013-10-29 17:09:41 +01:00
parent 5846059c3f
commit 3f150e12e7

View File

@ -40,6 +40,11 @@ except ImportError:
# it is available. Otherwise, we just don't allow user auth through GPG.
log.debug('Cannot import gnupg, using fallback.')
gnupg = None
try:
gnupg.GPG(gnupghome=None)
except TypeError:
# This is the 'gnupg' library, not 'python-gnupg'.
gnupg = None
available = (gnupg is not None)