~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: Vincent Ladeuil
  • Date: 2016-01-21 09:52:36 UTC
  • mto: This revision was merged to the branch mainline in revision 6611.
  • Revision ID: v.ladeuil+lp@free.fr-20160121095236-iandk0fic0phu9ey
Fix the failing gpg test on wily.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2011 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012, 2013, 2016 Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
322
322
                return SIGNATURE_NOT_VALID, None
323
323
        # A signature from a revoked key gets this.
324
324
        # test_verify_revoked_signature()
325
 
        if result[0].summary & gpgme.SIGSUM_SYS_ERROR:
 
325
        if ((result[0].summary & gpgme.SIGSUM_SYS_ERROR
 
326
             or result[0].status.strerror == 'Certificate revoked')):
326
327
            return SIGNATURE_NOT_VALID, None
327
328
        # Other error types such as revoked keys should (I think) be caught by
328
329
        # SIGSUM_RED so anything else means something is buggy.
329
 
        raise errors.SignatureVerificationFailed("Unknown GnuPG key "\
330
 
                                                 "verification result")
 
330
        raise errors.SignatureVerificationFailed(
 
331
            "Unknown GnuPG key verification result")
331
332
 
332
333
    def set_acceptable_keys(self, command_line_input):
333
334
        """Set the acceptable keys for verifying with this GPGStrategy.