Skip to content

Commit

Permalink
feat(zypper.py): add stderr to raise error of zypper subprocess
Browse files Browse the repository at this point in the history
Signed-off-by: Wabri <[email protected]>
  • Loading branch information
Wabri committed Oct 28, 2024
1 parent 2d5c31f commit 8b2a2f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zypper.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def print_reboot_required():
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
check=False)

if result.returncode == 0:
info.info({"node_reboot_required": "0"})
else:
Expand Down Expand Up @@ -152,7 +151,7 @@ def stdout_zypper_command(command):
)

if result.returncode != 0:
raise RuntimeError(f"zypper returned exit code {result.returncode}")
raise RuntimeError(f"zypper returned exit code {result.returncode}: {result.stderr}")

return result.stdout.decode('utf-8')

Expand Down

0 comments on commit 8b2a2f2

Please sign in to comment.