fix using GPG with non-utf8 OS. Fixes #7227

This commit is contained in:
Yann Leboulanger 2013-06-20 20:48:34 +02:00
parent 9e7ea9b328
commit 3f15047919
2 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,8 @@ class CommonConnection:
else:
def encrypt_thread(msg, keyID, always_trust=False):
# encrypt message. This function returns (msgenc, error)
return self.gpg.encrypt(msg, [keyID], always_trust)
return self.gpg.encrypt(msg, [keyID],
always_trust)
def _on_encrypted(output):
msgenc, error = output
if error == 'NOT_TRUSTED':

View File

@ -31,7 +31,6 @@ if HAVE_GPG:
class GnuPG(gnupg.GPG):
def __init__(self, use_agent=False):
gnupg.GPG.__init__(self)
gnupg.GPG.decode_errors = 'replace'
self.passphrase = None
self.use_agent = use_agent
self.always_trust = False