Skip to content

Commit 271b4f8

Browse files
Fix output of error message
cmp is a string already. Therefore, the join() statement is not necessary and only introduces additional spaces.
1 parent 5e6bb48 commit 271b4f8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

testinfra/utils/ansible_runner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@ def run_module(
393393
"msg": "Skipped. You might want to try check=False",
394394
}
395395
if not files:
396-
raise RuntimeError(
397-
"Error while running {}: {}".format(" ".join(cmd), out)
398-
)
396+
raise RuntimeError(f"{out}")
399397
fpath = os.path.join(d, files[0])
400398
try:
401399
with open(fpath, "r", encoding="ascii") as f:

0 commit comments

Comments
 (0)