Skip to content

Commit

Permalink
Work around subprocess.run not having a capture_output param in old P…
Browse files Browse the repository at this point in the history
  • Loading branch information
seizethedave committed Jan 30, 2024
1 parent 7ecdf70 commit aa883ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cattle/cattle_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def transfer(self, archive: str, executable: str, exec_dir: str):
shutil.copy(executable, exec_dir)

def exec_command(self, cmd: str):
proc = subprocess.run(cmd, capture_output=True, check=True, shell=True)
proc = subprocess.run(cmd, check=True, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return proc.stdout.decode().strip()

class HostRunner:
Expand Down

0 comments on commit aa883ba

Please sign in to comment.