Rev 6611: (vila) Fix bzrlib.tests.test_gpg.TestVerify.test_verify_revoked_signature in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Thu Jan 21 17:57:50 UTC 2016


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6611 [merge]
revision-id: pqm at pqm.ubuntu.com-20160121175750-8xaetjhvh8721f78
parent: pqm at pqm.ubuntu.com-20160121172945-wf8yhqpu1arae3a5
parent: v.ladeuil+lp at free.fr-20160121103011-92a8bf7a9euu3i10
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2016-01-21 17:57:50 +0000
message:
  (vila) Fix bzrlib.tests.test_gpg.TestVerify.test_verify_revoked_signature
   with recent versions of gpg. (Vincent Ladeuil)
modified:
  bzrlib/gpg.py                  gpg.py-20051017065112-8654536d415dacc6
  doc/en/release-notes/bzr-2.7.txt bzr2.7.txt-20130727124539-wnx897hy9l2h9f7x-1
=== modified file 'bzrlib/gpg.py'
--- a/bzrlib/gpg.py	2013-11-10 15:29:06 +0000
+++ b/bzrlib/gpg.py	2016-01-21 09:52:36 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2011 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012, 2013, 2016 Canonical Ltd
 #   Authors: Robert Collins <robert.collins at canonical.com>
 #
 # This program is free software; you can redistribute it and/or modify
@@ -322,12 +322,13 @@
                 return SIGNATURE_NOT_VALID, None
         # A signature from a revoked key gets this.
         # test_verify_revoked_signature()
-        if result[0].summary & gpgme.SIGSUM_SYS_ERROR:
+        if ((result[0].summary & gpgme.SIGSUM_SYS_ERROR
+             or result[0].status.strerror == 'Certificate revoked')):
             return SIGNATURE_NOT_VALID, None
         # Other error types such as revoked keys should (I think) be caught by
         # SIGSUM_RED so anything else means something is buggy.
-        raise errors.SignatureVerificationFailed("Unknown GnuPG key "\
-                                                 "verification result")
+        raise errors.SignatureVerificationFailed(
+            "Unknown GnuPG key verification result")
 
     def set_acceptable_keys(self, command_line_input):
         """Set the acceptable keys for verifying with this GPGStrategy.

=== modified file 'doc/en/release-notes/bzr-2.7.txt'
--- a/doc/en/release-notes/bzr-2.7.txt	2016-01-21 11:42:23 +0000
+++ b/doc/en/release-notes/bzr-2.7.txt	2016-01-21 17:57:50 +0000
@@ -76,6 +76,8 @@
    suite.  This can include new facilities for writing tests, fixes to 
    spurious test failures and changes to the way things should be tested.
 
+* Fix gpgme test failure starting on wily. (Vincent Ladeuil)
+     
 * Fix racy http tests (TestBadStatusServer is so simple, it exposes a race
   in python 2.7.9. This happens only when both the http server and client
   are run in the same process.). Only tests are affected.




More information about the bazaar-commits mailing list