summaryrefslogtreecommitdiff
path: root/components/bootstrap-debootstrap
diff options
context:
space:
mode:
authorKiel Christofferson <kiel@endpoint.com>2014-05-02 19:19:35 -0400
committerKiel Christofferson <kiel@endpoint.com>2014-06-17 13:32:37 -0400
commit846e8a079578507f576f6cb9e2628cb8ff8ca138 (patch)
tree6db7b2ea6086a92124a961b01afb1592a26629e9 /components/bootstrap-debootstrap
parente8cbbb09d378145d5467326de5e0f5144827eb38 (diff)
downloadvyos-live-build-846e8a079578507f576f6cb9e2628cb8ff8ca138.tar.gz
vyos-live-build-846e8a079578507f576f6cb9e2628cb8ff8ca138.zip
Replace subprocess.call() with subprocess.check_call().
Using check_call(), a non-zero return value from the subprocess will cause the desired behavior of an aborted build with a stack trace.
Diffstat (limited to 'components/bootstrap-debootstrap')
-rwxr-xr-xcomponents/bootstrap-debootstrap6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/bootstrap-debootstrap b/components/bootstrap-debootstrap
index cc81e77a0..70974be6e 100755
--- a/components/bootstrap-debootstrap
+++ b/components/bootstrap-debootstrap
@@ -118,7 +118,7 @@ def main():
# Notes:
# * there's no Python equivalent to 'cp -a' that handels both symlinks and device nodes properly.
- cache = subprocess.call('cp -a cache/bootstrap chroot', shell=True)
+ cache = subprocess.check_call('cp -a cache/bootstrap chroot', shell=True)
os.makedirs('.build', exist_ok=True)
open('.build/bootstrap', 'w').close()
@@ -142,7 +142,7 @@ def main():
if verbose:
print('I: Calling \'/usr/sbin/debootstrap ' + debootstrap_options + '\'')
- debootstrap = subprocess.call('/usr/sbin/debootstrap ' + debootstrap_options, shell=True)
+ debootstrap = subprocess.check_call('/usr/sbin/debootstrap ' + debootstrap_options, shell=True)
# package cache
if glob.glob('chroot/var/cache/apt/archives/*.deb'):
@@ -169,7 +169,7 @@ def main():
# Notes:
# * there's no Python equivalent to 'cp -a' that handels both symlinks and device nodes properly.
- cache = subprocess.call('cp -a chroot cache/bootstrap', shell=True)
+ cache = subprocess.check_call('cp -a chroot cache/bootstrap', shell=True)
# stagefile
os.makedirs('.build', exist_ok=True)