Skip to content

Commit a088e77

Browse files
authored
Don't fail when sigstore logs to stderr (#429)
1 parent f7f0f33 commit a088e77

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

run_release.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,12 +1090,18 @@ def run_add_to_python_dot_org(db: ReleaseShelf) -> None:
10901090
stdin, stdout, stderr = client.exec_command(
10911091
f"AUTH_INFO={auth_info} SIGSTORE_IDENTITY_TOKEN={identity_token} python3 add_to_pydotorg.py {db['release']}"
10921092
)
1093-
stderr_text = stderr.read().decode()
1094-
if stderr_text:
1095-
raise paramiko.SSHException(f"Failed to execute the command: {stderr_text}")
10961093
stdout_text = stdout.read().decode()
1094+
stderr_text = stderr.read().decode()
1095+
exit_status = stdout.channel.recv_exit_status()
1096+
if exit_status != 0:
1097+
raise paramiko.SSHException(
1098+
f"Failed to execute the command (exit code {exit_status}): {stderr_text}"
1099+
)
10971100
print("-- Command output --")
10981101
print(stdout_text)
1102+
if stderr_text:
1103+
print("-- Command stderr --")
1104+
print(stderr_text)
10991105
print("-- End of command output --")
11001106

11011107

0 commit comments

Comments
 (0)