mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix f-string, use function instead of lambda
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
co-authored by
Nicola Soranzo
parent
60b6c47b40
commit
13c34e974d
@@ -82,7 +82,9 @@ try:
|
||||
shlex_join = shlex.join # type: ignore[attr-defined]
|
||||
except AttributeError:
|
||||
# Python < 3.8
|
||||
shlex_join = lambda split_command: " ".join(map(shlex.quote, split_command)) # noqa: E731
|
||||
def shlex_join(split_command):
|
||||
return " ".join(map(shlex.quote, split_command))
|
||||
|
||||
|
||||
inflector = Inflector()
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ class BaseKubernetesIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, M
|
||||
if allow_wait and "is waiting to start" in p.stderr:
|
||||
return None
|
||||
raise Exception(
|
||||
f"Command '{shlex_join}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}"
|
||||
f"Command '{shlex_join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}"
|
||||
)
|
||||
return p.stdout
|
||||
|
||||
|
||||
Reference in New Issue
Block a user