[Python-apps-commits] r9521 - in packages/alot/trunk/debian (3 files)
laarmen-guest at users.alioth.debian.org
laarmen-guest at users.alioth.debian.org
Tue Apr 9 13:46:50 UTC 2013
Date: Tuesday, April 9, 2013 @ 13:46:48
Author: laarmen-guest
Revision: 9521
New patch fixing ill-instantiated GPGProblem exception, thanks to
Vasudev Kamath (Closes: #704884)
Added:
packages/alot/trunk/debian/patches/0008-GPGProblem-fix
Modified:
packages/alot/trunk/debian/changelog
packages/alot/trunk/debian/patches/series
Modified: packages/alot/trunk/debian/changelog
===================================================================
--- packages/alot/trunk/debian/changelog 2013-04-04 23:46:44 UTC (rev 9520)
+++ packages/alot/trunk/debian/changelog 2013-04-09 13:46:48 UTC (rev 9521)
@@ -1,3 +1,10 @@
+alot (0.3.4-2) UNRELEASED; urgency=low
+
+ * New patch fixing ill-instantiated GPGProblem exception, thanks to
+ Vasudev Kamath (Closes: #704884)
+
+ -- Simon Chopin <chopin.simon at gmail.com> Tue, 09 Apr 2013 15:33:32 +0200
+
alot (0.3.4-1) unstable; urgency=low
* New upstream release
Added: packages/alot/trunk/debian/patches/0008-GPGProblem-fix
===================================================================
--- packages/alot/trunk/debian/patches/0008-GPGProblem-fix (rev 0)
+++ packages/alot/trunk/debian/patches/0008-GPGProblem-fix 2013-04-09 13:46:48 UTC (rev 9521)
@@ -0,0 +1,56 @@
+From: Patrick Totzke <patricktotzke at gmail.com>
+Date: Sat, 6 Apr 2013 13:25:51 +0100
+Description: fix incorrect instanciations of GPGProblem
+ with missing 'code' parameter.
+ cf issue #590
+Applied-Upstream: commit:a1fc6b97b9d3975a3d0239f5e66ea2b78c53a43d
+
+--- a/alot/db/envelope.py
++++ b/alot/db/envelope.py
+@@ -18,7 +18,7 @@ import alot.helper as helper
+ import alot.crypto as crypto
+ import gpgme
+ from alot.settings import settings
+-from alot.errors import GPGProblem
++from alot.errors import GPGProblem, GPGCode
+
+ from attachment import Attachment
+ from utils import encode_header
+@@ -192,8 +192,9 @@ class Envelope(object):
+ signatures, signature_str = crypto.detached_signature_for(
+ plaintext, self.sign_key)
+ if len(signatures) != 1:
+- raise GPGProblem(("Could not sign message "
+- "(GPGME did not return a signature)"))
++ raise GPGProblem("Could not sign message (GPGME "
++ "did not return a signature)",
++ code=GPGCode.KEY_CANNOT_SIGN)
+ except gpgme.GpgmeError as e:
+ if e.code == gpgme.ERR_BAD_PASSPHRASE:
+ # If GPG_AGENT_INFO is unset or empty, the user just does
+@@ -201,11 +202,12 @@ class Envelope(object):
+ if os.environ.get('GPG_AGENT_INFO', '').strip() == '':
+ msg = "Got invalid passphrase and GPG_AGENT_INFO\
+ not set. Please set up gpg-agent."
+- raise GPGProblem(msg)
++ raise GPGProblem(msg, code=GPGCode.BAD_PASSPHRASE)
+ else:
+- raise GPGProblem(("Bad passphrase. Is "
+- "gpg-agent running?"))
+- raise GPGProblem(str(e))
++ raise GPGProblem("Bad passphrase. Is gpg-agent "
++ "running?",
++ code=GPGCode.BAD_PASSPHRASE)
++ raise GPGProblem(str(e), code=GPGCode.KEY_CANNOT_SIGN)
+
+ micalg = crypto.RFC3156_micalg_from_algo(signatures[0].hash_algo)
+ unencrypted_msg = MIMEMultipart('signed', micalg=micalg,
+@@ -235,7 +237,7 @@ class Envelope(object):
+ encrypted_str = crypto.encrypt(plaintext,
+ self.encrypt_keys.values())
+ except gpgme.GpgmeError as e:
+- raise GPGProblem(str(e))
++ raise GPGProblem(str(e), code=GPGCode.KEY_CANNOT_ENCRYPT)
+
+ outer_msg = MIMEMultipart('encrypted',
+ protocol='application/pgp-encrypted')
Modified: packages/alot/trunk/debian/patches/series
===================================================================
--- packages/alot/trunk/debian/patches/series 2013-04-04 23:46:44 UTC (rev 9520)
+++ packages/alot/trunk/debian/patches/series 2013-04-09 13:46:48 UTC (rev 9521)
@@ -1 +1,2 @@
0007-use-local-intersphinx-links
+0008-GPGProblem-fix
More information about the Python-apps-commits
mailing list