diff options
author | Tomáš Levora <t.levora@partner.samsung.com> | 2019-06-05 10:55:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-05 10:55:46 +0000 |
commit | d3cb6429d6d3cdcd625906e702140a51fc146847 (patch) | |
tree | 5ee819b12371db16cef4f066530ae46f0d799a02 /build/download/npm_packages.py | |
parent | c8601f0659f90fc2ca390de6d5d7682d1af190f0 (diff) | |
parent | 455be472dfdd4b3c9d2e1cc3c4962115760383f4 (diff) |
Merge "Add base download script"
Diffstat (limited to 'build/download/npm_packages.py')
-rwxr-xr-x | build/download/npm_packages.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/build/download/npm_packages.py b/build/download/npm_packages.py index c174e2c1..70c03ad8 100755 --- a/build/download/npm_packages.py +++ b/build/download/npm_packages.py @@ -57,7 +57,7 @@ def download_npm(npm, registry, dst_dir): except Exception as err: if os.path.isfile(dst_path): os.remove(dst_path) - log.error('Failed: {}: {}'.format(npm, err)) + log.exception('Failed: {}'.format(npm)) raise err log.info('Downloaded: {}'.format(npm)) @@ -81,12 +81,10 @@ def download(npm_list, registry, dst_dir, check_mode, progress=None, workers=Non base.start_progress(progress, len(npm_set), skipping, log) error_count = base.run_concurrent(workers, progress, download_npm, missing_npms, registry, dst_dir) + base.finish_progress(progress, error_count, log) if error_count > 0: log.error('{} packages were not downloaded. Check log for specific failures.'.format(error_count)) - - base.finish_progress(progress, error_count, log) - - return error_count + raise RuntimeError() def run_cli(): |