fix using GPG with non-utf8 OS. Fixes #7227
This commit is contained in:
parent
9e7ea9b328
commit
3f15047919
|
@ -294,7 +294,8 @@ class CommonConnection:
|
||||||
else:
|
else:
|
||||||
def encrypt_thread(msg, keyID, always_trust=False):
|
def encrypt_thread(msg, keyID, always_trust=False):
|
||||||
# encrypt message. This function returns (msgenc, error)
|
# 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):
|
def _on_encrypted(output):
|
||||||
msgenc, error = output
|
msgenc, error = output
|
||||||
if error == 'NOT_TRUSTED':
|
if error == 'NOT_TRUSTED':
|
||||||
|
|
|
@ -31,7 +31,6 @@ if HAVE_GPG:
|
||||||
class GnuPG(gnupg.GPG):
|
class GnuPG(gnupg.GPG):
|
||||||
def __init__(self, use_agent=False):
|
def __init__(self, use_agent=False):
|
||||||
gnupg.GPG.__init__(self)
|
gnupg.GPG.__init__(self)
|
||||||
gnupg.GPG.decode_errors = 'replace'
|
|
||||||
self.passphrase = None
|
self.passphrase = None
|
||||||
self.use_agent = use_agent
|
self.use_agent = use_agent
|
||||||
self.always_trust = False
|
self.always_trust = False
|
||||||
|
|
Loading…
Reference in New Issue