diff options
author | Kiel Christofferson <kiel@endpoint.com> | 2014-05-02 19:19:35 -0400 |
---|---|---|
committer | Kiel Christofferson <kiel@endpoint.com> | 2014-06-17 13:32:37 -0400 |
commit | 846e8a079578507f576f6cb9e2628cb8ff8ca138 (patch) | |
tree | 6db7b2ea6086a92124a961b01afb1592a26629e9 /components/bootstrap-cdebootstrap | |
parent | e8cbbb09d378145d5467326de5e0f5144827eb38 (diff) | |
download | vyos-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-cdebootstrap')
-rwxr-xr-x | components/bootstrap-cdebootstrap | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/bootstrap-cdebootstrap b/components/bootstrap-cdebootstrap index 514bb79d7..59c83c8df 100755 --- a/components/bootstrap-cdebootstrap +++ b/components/bootstrap-cdebootstrap @@ -113,7 +113,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() @@ -140,7 +140,7 @@ def main(): # * calling cdebootstrap twice: # - to use already downloaded /var/cache/bootstrap/*.deb on incomplete builds # - to use /var/cache/boottrap/*.deb for debian-installer - cdebootstrap = subprocess.call('/usr/bin/cdebootstrap --download-only ' + cdebootstrap_options, shell=True) + cdebootstrap = subprocess.check_call('/usr/bin/cdebootstrap --download-only ' + cdebootstrap_options, shell=True) # package cache if glob.glob('chroot/var/cache/bootstrap/*.deb'): @@ -163,7 +163,7 @@ def main(): if verbose: print('I: Calling \'/usr/bin/debootstrap ' + cdebootstrap_options + '\'') - cdebootstrap = subprocess.call('/usr/bin/cdebootstrap ' + cdebootstrap_options, shell=True) + cdebootstrap = subprocess.check_call('/usr/bin/cdebootstrap ' + cdebootstrap_options, shell=True) # stage cache if not os.path.exists('cache/bootstrap'): @@ -172,7 +172,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) |