Skip to content

Commit 1dea031

Browse files
committed
Refactor _exec_cmd function to be compatible with python 3.9 to 3.14
1 parent ad48b2a commit 1dea031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sling/sling/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def cli(*args, return_output=False):
493493

494494

495495
def _exec_cmd(
496-
cmd: str, stdin=None, stdout=PIPE, stderr=STDOUT, env: dict[str, str] | None = None
496+
cmd: str, stdin=None, stdout=PIPE, stderr=STDOUT, env: dict = None
497497
):
498498
lines: list[str] = []
499499

@@ -524,7 +524,7 @@ def _exec_cmd(
524524

525525
if proc.returncode != 0:
526526
if len(lines) > 0:
527-
raise Exception(f"Sling command failed:\n{'\n'.join(lines)}")
527+
raise Exception("Sling command failed:\n" + "\n".join(lines))
528528
raise Exception("Sling command failed")
529529

530530

0 commit comments

Comments
 (0)