Skip to content

Commit

Permalink
Fix output of error message
Browse files Browse the repository at this point in the history
cmp is a string already. Therefore, the join() statement is not necessary
and only introduces additional spaces.
  • Loading branch information
CarstenGrohmann authored Aug 25, 2023
1 parent 5e6bb48 commit 271b4f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions testinfra/utils/ansible_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,7 @@ def run_module(
"msg": "Skipped. You might want to try check=False",
}
if not files:
raise RuntimeError(
"Error while running {}: {}".format(" ".join(cmd), out)
)
raise RuntimeError(f"{out}")
fpath = os.path.join(d, files[0])
try:
with open(fpath, "r", encoding="ascii") as f:
Expand Down

0 comments on commit 271b4f8

Please sign in to comment.