From 4d39936381931fa6f91d4f431f98a674ed1574dc Mon Sep 17 00:00:00 2001 From: Evgeny Svet Date: Tue, 23 Jan 2018 18:34:58 +0300 Subject: [PATCH] Compatibility with new version python tnt --- aiotarantool_queue/queue.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/aiotarantool_queue/queue.py b/aiotarantool_queue/queue.py index 619aaf1..6652fb8 100644 --- a/aiotarantool_queue/queue.py +++ b/aiotarantool_queue/queue.py @@ -7,7 +7,16 @@ import asyncio import aiotarantool -from tarantool.const import ENCODING_DEFAULT + +try: + # tarantool-python >= 0.6.1 + # + from tarantool.utils import ENCODING_DEFAULT +except ImportError: + # tarantool-python < 0.6.1 + # + from tarantool.const import ENCODING_DEFAULT + READY = "r" TAKEN = "t"