summaryrefslogtreecommitdiff
path: root/scripts/image-build/utils.py
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-09-19 18:00:10 +0200
committerdd <dd@wx.tnyzeq.icu>2024-09-19 18:00:10 +0200
commitef7abd039d191fc3a963bbbdc72fabbc01676092 (patch)
treed0ba9de260eb7e681ae2675eecd7d084b834c6ff /scripts/image-build/utils.py
parentb7b55dd11feb23b7d70fc2c1b0bbbf7fa759e3fb (diff)
parent8274a418944c4cfc4c431951fc0018d72b15a0bf (diff)
downloadvyos-build-ef7abd039d191fc3a963bbbdc72fabbc01676092.tar.gz
vyos-build-ef7abd039d191fc3a963bbbdc72fabbc01676092.zip
Merge branch 'vyos:current' into current
Diffstat (limited to 'scripts/image-build/utils.py')
-rw-r--r--scripts/image-build/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/image-build/utils.py b/scripts/image-build/utils.py
index 7002b281..081327cd 100644
--- a/scripts/image-build/utils.py
+++ b/scripts/image-build/utils.py
@@ -82,3 +82,10 @@ def cmd(command):
res = vyos.utils.process.call(command, shell=True)
if res > 0:
raise OSError(f"Command '{command}' failed")
+
+def rc_cmd(command):
+ code, out = vyos.utils.process.rc_cmd(command, shell=True)
+ if code > 0:
+ raise OSError(f"Command '{command}' failed")
+ else:
+ return out