Fix import of supybot.gpg if gnupg is not available.

This commit is contained in:
Valentin Lorentz 2013-11-02 06:17:51 +00:00
parent cc9f1f0a2c
commit 0876bb345c

View File

@ -41,7 +41,8 @@ except ImportError:
log.debug('Cannot import gnupg, using fallback.')
gnupg = None
try:
gnupg.GPG(gnupghome=None)
if gnupg:
gnupg.GPG(gnupghome=None)
except TypeError:
# This is the 'gnupg' library, not 'python-gnupg'.
gnupg = None