diff options
Diffstat (limited to 'sources/pyside-tools/deploy_lib/commands.py')
-rw-r--r-- | sources/pyside-tools/deploy_lib/commands.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sources/pyside-tools/deploy_lib/commands.py b/sources/pyside-tools/deploy_lib/commands.py index 53ad633ea..3a7e2a2e2 100644 --- a/sources/pyside-tools/deploy_lib/commands.py +++ b/sources/pyside-tools/deploy_lib/commands.py @@ -1,13 +1,11 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +import json import subprocess import sys -import logging -from typing import List - -import json from pathlib import Path +from typing import List """ All utility functions for deployment @@ -27,17 +25,15 @@ def run_command(command, dry_run: bool, fetch_output: bool = False): else: print(command_str + "\n") except FileNotFoundError as error: - logging.exception(f"[DEPLOY] {error.filename} not found") - raise + raise FileNotFoundError(f"[DEPLOY] {error.filename} not found") except subprocess.CalledProcessError as error: - logging.exception( + raise RuntimeError( f"[DEPLOY] Command {command_str} failed with error {error} and return_code" f"{error.returncode}" ) - raise except Exception as error: - logging.exception(f"[DEPLOY] Command {command_str} failed with error {error}") - raise + raise RuntimeError(f"[DEPLOY] Command {command_str} failed with error {error}") + return command_str, output |