From 8a7ce9455533513c7d57703e1f948b144784bed3 Mon Sep 17 00:00:00 2001 From: Eugine Blikh <bigbes@gmail.com> Date: Tue, 23 Jul 2013 15:06:32 +0400 Subject: [PATCH] Moving extra call code to admin_connection --- test/lib/admin_connection.py | 7 +++++++ test/lib/tarantool_connection.py | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/lib/admin_connection.py b/test/lib/admin_connection.py index 584a79d2d0..0c8c34b040 100644 --- a/test/lib/admin_connection.py +++ b/test/lib/admin_connection.py @@ -97,3 +97,10 @@ class AdminConnection(TarantoolConnection): if (not rg1 or len(rg1.group()) != len(command)) and not rg2: add_lua=True return self.execute_simple(command, silent, lua=add_lua) + + def __call__(self, command, silent=False, simple=False): + if not simple: + return self.execute(command, silent) + else: + self.opt_reconnect() + return self.execute_simple(command, silent) diff --git a/test/lib/tarantool_connection.py b/test/lib/tarantool_connection.py index 8fba6bb8b0..e05ee6baba 100644 --- a/test/lib/tarantool_connection.py +++ b/test/lib/tarantool_connection.py @@ -76,8 +76,4 @@ class TarantoolConnection(object): self.disconnect() def __call__(self, command, silent=False, simple=False): - if not simple: - return self.execute(command, silent) - else: - self.opt_reconnect() - return self.execute_simple(command, silent) + return self.execute(command, silent) -- GitLab