aboutsummaryrefslogtreecommitdiff
path: root/python/olm
diff options
context:
space:
mode:
Diffstat (limited to 'python/olm')
-rw-r--r--python/olm/group_session.py4
-rw-r--r--python/olm/pk.py4
-rw-r--r--python/olm/session.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/python/olm/group_session.py b/python/olm/group_session.py
index 313e5fa..5068192 100644
--- a/python/olm/group_session.py
+++ b/python/olm/group_session.py
@@ -176,7 +176,7 @@ class InboundGroupSession(object):
raise OlmGroupSessionError(last_error)
- def decrypt(self, ciphertext, errors="replace"):
+ def decrypt(self, ciphertext, unicode_errors="replace"):
# type: (AnyStr, str) -> Tuple[str, int]
"""Decrypt a message
@@ -232,7 +232,7 @@ class InboundGroupSession(object):
plaintext = to_unicode_str(
ffi.unpack(plaintext_buffer, plaintext_length),
- errors=errors
+ errors=unicode_errors
)
# clear out copies of the plaintext
diff --git a/python/olm/pk.py b/python/olm/pk.py
index 18608b7..4352359 100644
--- a/python/olm/pk.py
+++ b/python/olm/pk.py
@@ -313,7 +313,7 @@ class PkDecryption(object):
return obj
- def decrypt(self, message, errors="replace"):
+ def decrypt(self, message, unicode_errors="replace"):
# type (PkMessage, str) -> str
"""Decrypt a previously encrypted Pk message.
@@ -361,7 +361,7 @@ class PkDecryption(object):
# clear out copies of the plaintext
lib.memset(plaintext_buffer, 0, max_plaintext_length)
- return to_unicode_str(plaintext, errors=errors)
+ return to_unicode_str(plaintext, errors=unicode_errors)
def _clear_pk_signing(pk_struct):
diff --git a/python/olm/session.py b/python/olm/session.py
index f81b727..636eb3d 100644
--- a/python/olm/session.py
+++ b/python/olm/session.py
@@ -273,7 +273,7 @@ class Session(object):
else: # pragma: no cover
raise ValueError("Unknown message type")
- def decrypt(self, message, errors="replace"):
+ def decrypt(self, message, unicode_errors="replace"):
# type: (_OlmMessage, str) -> str
"""Decrypts a message using the session. Returns the plaintext string
on success. Raises OlmSessionError on failure. If the base64 couldn't
@@ -320,7 +320,7 @@ class Session(object):
self._check_error(plaintext_length)
plaintext = to_unicode_str(
ffi.unpack(plaintext_buffer, plaintext_length),
- errors=errors
+ errors=unicode_errors
)
# clear out copies of the plaintext