Skip to content

Commit d4dfe86

Browse files
authored
Merge pull request #7221 from nicoddemus/fix-release-on-comment
2 parents f506682 + e1becae commit d4dfe86

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/release-on-comment.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@
3131
import re
3232
import sys
3333
from pathlib import Path
34+
from subprocess import CalledProcessError
3435
from subprocess import check_call
3536
from subprocess import check_output
36-
from subprocess import PIPE
3737
from subprocess import run
38-
from subprocess import STDOUT
3938
from textwrap import dedent
4039
from typing import Dict
4140
from typing import Optional
@@ -178,7 +177,7 @@ def trigger_release(payload_path: Path, token: str) -> None:
178177
print(f"Notified in original comment {Fore.CYAN}{comment.url}{Fore.RESET}.")
179178

180179
print(f"{Fore.GREEN}Success.")
181-
except CallProcessError as e:
180+
except CalledProcessError as e:
182181
error_contents = e.output
183182
except Exception as e:
184183
error_contents = str(e)
@@ -213,7 +212,7 @@ def trigger_release(payload_path: Path, token: str) -> None:
213212
"""
214213
)
215214
)
216-
print_and_exit(f"{Fore.RED}{e}")
215+
print_and_exit(f"{Fore.RED}{error_contents}")
217216

218217

219218
def find_next_version(base_branch: str) -> str:

0 commit comments

Comments
 (0)