diff options
| author | dd <dd@wx.tnyzeq.icu> | 2024-09-19 18:00:10 +0200 |
|---|---|---|
| committer | dd <dd@wx.tnyzeq.icu> | 2024-09-19 18:00:10 +0200 |
| commit | ef7abd039d191fc3a963bbbdc72fabbc01676092 (patch) | |
| tree | d0ba9de260eb7e681ae2675eecd7d084b834c6ff /scripts/image-build/utils.py | |
| parent | b7b55dd11feb23b7d70fc2c1b0bbbf7fa759e3fb (diff) | |
| parent | 8274a418944c4cfc4c431951fc0018d72b15a0bf (diff) | |
| download | vyos-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.py | 7 |
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 |
