aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhukoff-pavel <zhukoff-pavel@yandex-team.com>2023-09-27 00:10:51 +0300
committerzhukoff-pavel <zhukoff-pavel@yandex-team.com>2023-09-27 00:31:10 +0300
commitd6b6299558baad3055fb6e35b1f72ec5bf6e123c (patch)
tree7c5c4d0d0392259798945cf165d2cd339d926eb5
parenta99a9ca804b87eb23184d1a6b2072c01d65b86cf (diff)
downloadydb-d6b6299558baad3055fb6e35b1f72ec5bf6e123c.tar.gz
fix run_ut to work with py3
-rw-r--r--library/python/cores/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/python/cores/__init__.py b/library/python/cores/__init__.py
index 7197a40553..3001187b22 100644
--- a/library/python/cores/__init__.py
+++ b/library/python/cores/__init__.py
@@ -193,12 +193,12 @@ def resolve_addresses(addresses, symbolizer, binary):
"--obj",
binary,
]
- proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **({'text': True} if six.PY3 else {}))
out, err = proc.communicate(input="\n".join(addresses))
if proc.returncode:
raise Exception("Symbolizer failed with rc:{}\nstderr: {}".format(proc.returncode, err))
- resolved = filter(None, out.split("\n\n"))
+ resolved = list(filter(None, out.split("\n\n")))
if len(addresses) != len(resolved):
raise Exception("llvm-symbolizer can not extract lines from addresses (count mismatch: {}-{})".format(len(addresses), len(resolved)))