Skip to content

Commit 2101b10

Browse files
fix: IPROTO_ID auth method encoding
If encoding=None is used (or similar decoder configuration), authentication method received in IPROTO_ID response is not an str, but a bytes object, which is unexpected. This patch fixed the behavior. Follows #269
1 parent d0126c8 commit 2101b10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: tarantool/response.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
SchemaReloadException,
3131
tnt_strerror
3232
)
33+
from tarantool.schema import to_unicode
3334

3435
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
3536

@@ -397,4 +398,4 @@ def auth_type(self):
397398

398399
if self._return_code != 0:
399400
return None
400-
return self._body.get(IPROTO_AUTH_TYPE)
401+
return to_unicode(self._body.get(IPROTO_AUTH_TYPE))

0 commit comments

Comments
 (0)