Skip to content

Commit

Permalink
# We will capture stdout and stderr in stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
fernando79513 committed Mar 8, 2024
1 parent fbe1332 commit 62a0532
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/sru/bin/dkms_build_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def run_command(command: List[str]) -> str:
try:
result = subprocess.check_output(
command,
stderr=subprocess.PIPE,
stderr=subprocess.STDOUT, # We capture stdout and stderr in stdout
universal_newlines=True,
)
return result.strip()
except subprocess.CalledProcessError as e:
raise SystemExit(
"Command '{0}' failed with exit code {1}:\n{2}".format(
e.cmd, e.returncode, e.stderr
e.cmd, e.returncode, e.stdout
)
)

Expand Down Expand Up @@ -161,7 +161,7 @@ def has_dkms_build_errors(kernel_ver_current: str) -> int:

def main():
# Get the kernel version and DKMS status
ubuntu_release = run_command(["lsb_release", "-r"]).split()[-1]
ubuntu_release = run_command(["lsb_release", "-er"]).split()[-1]
dkms_status = run_command(["dkms", "status"])

# Parse and sort the DKMS status and sort the kernel versions
Expand Down

0 comments on commit 62a0532

Please sign in to comment.