aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/unpacking_jtest_runner.py
diff options
context:
space:
mode:
authoriaz1607 <iaz1607@yandex-team.com>2023-11-30 12:16:39 +0300
committeriaz1607 <iaz1607@yandex-team.com>2023-11-30 12:56:46 +0300
commit8951ddf780e02616cdb2ec54a02bc354e8507c0f (patch)
tree478097488957d3b554e25868c972a959bb40d78e /build/scripts/unpacking_jtest_runner.py
parenta5acb7aa4ca5a4603215e878eb0cad786793262b (diff)
downloadydb-8951ddf780e02616cdb2ec54a02bc354e8507c0f.tar.gz
`build/scripts` ya style --py
Diffstat (limited to 'build/scripts/unpacking_jtest_runner.py')
-rw-r--r--build/scripts/unpacking_jtest_runner.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/build/scripts/unpacking_jtest_runner.py b/build/scripts/unpacking_jtest_runner.py
index 9730dcd711..dbcbd4a7d7 100644
--- a/build/scripts/unpacking_jtest_runner.py
+++ b/build/scripts/unpacking_jtest_runner.py
@@ -32,7 +32,7 @@ def fix_cmd(cmd):
p = subprocess.Popen([java, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
out, err = out.strip(), err.strip()
- if ((out or '').strip().startswith('java version "1.8') or (err or '').strip().startswith('java version "1.8')):
+ if (out or '').strip().startswith('java version "1.8') or (err or '').strip().startswith('java version "1.8'):
res = []
i = 0
while i < len(cmd):
@@ -71,9 +71,7 @@ def extract_jars(dest, archive):
def make_bfg_from_cp(class_path, out):
- class_path = ' '.join(
- map(lambda path: ('file:/' + path.lstrip('/')) if os.path.isabs(path) else path, class_path)
- )
+ class_path = ' '.join(map(lambda path: ('file:/' + path.lstrip('/')) if os.path.isabs(path) else path, class_path))
with zipfile.ZipFile(out, 'w') as zf:
lines = []
while class_path:
@@ -127,7 +125,7 @@ def main():
mf = os.pathsep.join([dest] + class_path)
else:
raise Exception("Unexpected classpath option type: " + opts.classpath_option_type)
- args = fix_cmd(args[:cp_idx + 1]) + [mf] + args[cp_idx + 2:]
+ args = fix_cmd(args[: cp_idx + 1]) + [mf] + args[cp_idx + 2 :]
else:
args[cp_idx + 1] = args[cp_idx + 1].replace(opts.tests_jar_path, dest)
args = fix_cmd(args[:cp_idx]) + args[cp_idx:]