From d3696d878f9ed6eed46723550dff8c1b914b62da Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 29 Apr 2024 14:33:25 +0000 Subject: build: T3664: fail the build on external command errors (cherry picked from commit 7dfd9232da787a7befbc4338d4eb21fee4325174) --- scripts/image-build/raw_image.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scripts/image-build/raw_image.py') diff --git a/scripts/image-build/raw_image.py b/scripts/image-build/raw_image.py index 67039a24..ae061990 100644 --- a/scripts/image-build/raw_image.py +++ b/scripts/image-build/raw_image.py @@ -25,11 +25,7 @@ import vyos.utils.process SQUASHFS_FILE = 'live/filesystem.squashfs' VERSION_FILE = 'version.json' - -def cmd(command): - res = vyos.utils.process.call(command, shell=True) - if res > 0: - raise OSError(f"Command '{command}' failed") +from utils import cmd def mkdir(path): os.makedirs(path, exist_ok=True) -- cgit v1.2.3