Merge branch 'fix/49-unicode-decode-on-readline' into develop
commit
751f25cb35
|
@ -159,6 +159,14 @@ class GPGBase(object):
|
|||
self._filesystemencoding = encodings.normalize_encoding(
|
||||
sys.getfilesystemencoding().lower())
|
||||
|
||||
# Issue #49: https://github.com/isislovecruft/python-gnupg/issues/49
|
||||
#
|
||||
# During `line = stream.readline()` in `_read_response()`, the Python
|
||||
# codecs module will choke on Unicode data, so we globally monkeypatch
|
||||
# the "strict" error handler to use the builtin `replace_errors`
|
||||
# handler:
|
||||
codecs.register_error('strict', codecs.replace_errors)
|
||||
|
||||
self._keyserver = 'hkp://wwwkeys.pgp.net'
|
||||
self.__generated_keys = os.path.join(self.homedir, 'generated-keys')
|
||||
|
||||
|
|
Loading…
Reference in New Issue