~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: Patch Queue Manager
  • Date: 2015-10-05 13:45:00 UTC
  • mfrom: (6603.3.1 bts794146)
  • Revision ID: pqm@pqm.ubuntu.com-20151005134500-v244rho557tv0ukd
(vila) Resolve Bug #1480015: Test failure: hexify removed from paramiko
 (Andrew Starr-Bochicchio) (Andrew Starr-Bochicchio)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012, 2013, 2016 Canonical Ltd
 
1
# Copyright (C) 2005, 2011 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
326
 
             or result[0].status.strerror == 'Certificate revoked')):
 
325
        if result[0].summary & gpgme.SIGSUM_SYS_ERROR:
327
326
            return SIGNATURE_NOT_VALID, None
328
327
        # Other error types such as revoked keys should (I think) be caught by
329
328
        # SIGSUM_RED so anything else means something is buggy.
330
 
        raise errors.SignatureVerificationFailed(
331
 
            "Unknown GnuPG key verification result")
 
329
        raise errors.SignatureVerificationFailed("Unknown GnuPG key "\
 
330
                                                 "verification result")
332
331
 
333
332
    def set_acceptable_keys(self, command_line_input):
334
333
        """Set the acceptable keys for verifying with this GPGStrategy.