Skip to content

Commit 5e9a601

Browse files
author
Alexander Smishlajev
committed
fix gettext markup
1 parent 4564ede commit 5e9a601

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

roundup/mailgw.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.190 2007-09-22 07:25:34 jpend Exp $
76+
$Id: mailgw.py,v 1.191 2007-09-24 09:52:18 a1s Exp $
7777
"""
7878
__docformat__ = 'restructuredtext'
7979

@@ -157,16 +157,16 @@ def check_pgp_sigs(sig):
157157
# message in our bounce
158158
if sig.summary & pyme.gpgme.GPGME_SIGSUM_KEY_MISSING:
159159
raise MailUsageError, \
160-
_(''"Message signed with unknown key: " + sig.fpr)
160+
_("Message signed with unknown key: %s") % sig.fpr
161161
elif sig.summary & pyme.gpgme.GPGME_SIGSUM_KEY_EXPIRED:
162162
raise MailUsageError, \
163-
_(''"Message signed with an expired key: " + sig.fpr)
163+
_("Message signed with an expired key: %s") % sig.fpr
164164
elif sig.summary & pyme.gpgme.GPGME_SIGSUM_KEY_REVOKED:
165165
raise MailUsageError, \
166-
_(''"Message signed with a revoked key: " + sig.fpr)
166+
_("Message signed with a revoked key: %s") % sig.fpr
167167
else:
168168
raise MailUsageError, \
169-
_(''"Invalid PGP signature detected.")
169+
_("Invalid PGP signature detected.")
170170
sig = sig.next
171171

172172
class Message(mimetools.Message):
@@ -360,7 +360,7 @@ def decrypt(self):
360360
# the message meets the RFC before we try to decrypt it.
361361
if hdr.getbody() != 'Version: 1' or hdr.gettype() != 'application/pgp-encrypted':
362362
raise MailUsageError, \
363-
_(''"Unknown multipart/encrypted version.")
363+
_("Unknown multipart/encrypted version.")
364364

365365
context = pyme.core.Context()
366366
ciphertext = pyme.core.Data(msg.getbody())
@@ -369,7 +369,7 @@ def decrypt(self):
369369
result = context.op_decrypt_verify(ciphertext, plaintext)
370370

371371
if result:
372-
raise MailUsageError, _(''"Unable to decrypt your message.")
372+
raise MailUsageError, _("Unable to decrypt your message.")
373373

374374
# we've decrypted it but that just means they used our public
375375
# key to send it to us. now check the signatures to see if it
@@ -398,7 +398,7 @@ def verify_signature(self):
398398

399399
if sig.gettype() != 'application/pgp-signature':
400400
raise MailUsageError, \
401-
_(''"No PGP signature found in message.")
401+
_("No PGP signature found in message.")
402402

403403
context = pyme.core.Context()
404404
# msg.getbody() is skipping over some headers that are

0 commit comments

Comments
 (0)