Yann Leboulanger pushed to branch gajim_0.16 at gajim / gajim
Commits: c23156b1 by Yann Leboulanger at 2016-12-15T21:31:23+01:00 correctly check if python-gnupg is installed - - - - - 6d866b14 by Yann Leboulanger at 2016-12-15T21:31:49+01:00 don't crash when gnupg doesn't have a status attribute. - - - - - 2 changed files: - src/common/gajim.py - src/common/gpg.py Changes: ===================================== src/common/gajim.py ===================================== --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -160,7 +160,7 @@ except ImportError: HAVE_GPG = True GPG_BINARY = 'gpg' try: - __import__('gnupg', globals(), locals(), [], -1) + __import__('gnupg') except ImportError: HAVE_GPG = False else: ===================================== src/common/gpg.py ===================================== --- a/src/common/gpg.py +++ b/src/common/gpg.py @@ -90,7 +90,7 @@ if HAVE_GPG: if result.fingerprint: return self._stripHeaderFooter(str(result)) - if result.status == 'key expired': + if hasattr(result, 'status') and result.status == 'key expired': return 'KEYEXPIRED' return 'BAD_PASSPHRASE' View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/87e57c7c0d5611bab931f364e799dddade8d37c8...6d866b14248a0c9d2fbde72d19a733d71412e4d1
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits