don't crash when gnupg doesn't have a status attribute.

This commit is contained in:
Yann Leboulanger 2016-12-15 21:31:49 +01:00
parent 58341e9742
commit d9efb31b2e
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,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'