From f37c4c9349e2c8c433d52d4be744cf5dc9aa7909 Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Mon, 4 Dec 2023 12:08:11 +0300 Subject: Intermediate changes --- library/python/testing/swag/daemon.py | 9 +++------ library/python/testing/swag/lib/ya.make | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'library/python/testing') diff --git a/library/python/testing/swag/daemon.py b/library/python/testing/swag/daemon.py index e59bedb5e7e..81fd0eb97b1 100644 --- a/library/python/testing/swag/daemon.py +++ b/library/python/testing/swag/daemon.py @@ -3,11 +3,12 @@ import logging import os -import sys import signal import tempfile import shutil +import six + try: from . import gdb except ValueError: @@ -66,11 +67,7 @@ class Daemon(object): self.stdinf = stdin or tempfile.NamedTemporaryFile(dir=self.cwd, prefix="stdin_", delete=False) self.cmd = command - if sys.version_info.major > 2: - _basestring = str - else: - _basestring = basestring - if isinstance(command, _basestring): + if isinstance(command, six.string_types): self.cmd = [arg for arg in command.split() if arg] self.daemon = None self.name = os.path.basename(self.cmd[0]) diff --git a/library/python/testing/swag/lib/ya.make b/library/python/testing/swag/lib/ya.make index e3e7cfa3008..0567288a629 100644 --- a/library/python/testing/swag/lib/ya.make +++ b/library/python/testing/swag/lib/ya.make @@ -1,6 +1,7 @@ PY23_LIBRARY() PEERDIR( + contrib/python/six contrib/python/protobuf library/python/testing/yatest_common ) -- cgit v1.3