From e1becae24ca1e6695026d0ed407a2cc7402b4829 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 16 May 2020 13:42:39 -0300 Subject: [PATCH] Fix errors introduced by #6911 Somehow I've missed the failures while merging, totally my fault. --- scripts/release-on-comment.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/release-on-comment.py b/scripts/release-on-comment.py index 5ed71f236..521a19fac 100644 --- a/scripts/release-on-comment.py +++ b/scripts/release-on-comment.py @@ -31,11 +31,10 @@ import os import re import sys from pathlib import Path +from subprocess import CalledProcessError from subprocess import check_call from subprocess import check_output -from subprocess import PIPE from subprocess import run -from subprocess import STDOUT from textwrap import dedent from typing import Dict from typing import Optional @@ -178,7 +177,7 @@ def trigger_release(payload_path: Path, token: str) -> None: print(f"Notified in original comment {Fore.CYAN}{comment.url}{Fore.RESET}.") print(f"{Fore.GREEN}Success.") - except CallProcessError as e: + except CalledProcessError as e: error_contents = e.output except Exception as e: error_contents = str(e) @@ -213,7 +212,7 @@ def trigger_release(payload_path: Path, token: str) -> None: """ ) ) - print_and_exit(f"{Fore.RED}{e}") + print_and_exit(f"{Fore.RED}{error_contents}") def find_next_version(base_branch: str) -> str: