Skip to content

Commit 8b2a2f2

Browse files
committed
feat(zypper.py): add stderr to raise error of zypper subprocess
Signed-off-by: Wabri <[email protected]>
1 parent 2d5c31f commit 8b2a2f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

zypper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def print_reboot_required():
113113
stdout=subprocess.DEVNULL,
114114
stderr=subprocess.DEVNULL,
115115
check=False)
116-
117116
if result.returncode == 0:
118117
info.info({"node_reboot_required": "0"})
119118
else:
@@ -152,7 +151,7 @@ def stdout_zypper_command(command):
152151
)
153152

154153
if result.returncode != 0:
155-
raise RuntimeError(f"zypper returned exit code {result.returncode}")
154+
raise RuntimeError(f"zypper returned exit code {result.returncode}: {result.stderr}")
156155

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

0 commit comments

Comments
 (0)