Paste number 331929: debian fix for pygpgme

Paste number 331929: debian fix for pygpgme
Pasted by: paroneayea
When:5 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+7449
Channel:None
Paste contents:
Raw Source | XML | Display As
From 024fe219582143017b2f02bc924c0ed107b63619 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Mon, 1 Feb 2016 19:27:59 -0500
Subject: [PATCH 3/5] handle generic error when no passphrase callback present

apparently gpg 2.1 returns ERR_GENERAL right now if the pinentry was
in loopback mode and no passphrase callback was supplied.  Earlier
versions supplied ERR_BAD_PASSPHRASE.
---
 tests/test_passphrase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_passphrase.py b/tests/test_passphrase.py
index 0a235e9..35b3c59 100644
--- a/tests/test_passphrase.py
+++ b/tests/test_passphrase.py
@@ -41,7 +41,7 @@ class PassphraseTestCase(GpgHomeTestCase):
             new_sigs = ctx.sign(plaintext, signature, gpgme.SIG_MODE_CLEAR)
         except gpgme.GpgmeError as exc:
             self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_GPGME)
-            self.assertEqual(exc.args[1], gpgme.ERR_BAD_PASSPHRASE)
+            self.assertEqual(exc.args[1], gpgme.ERR_GENERAL)
         else:
             self.fail('gpgme.GpgmeError not raised')
 
-- 
2.7.0

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.