Skip to content

Commit

Permalink
Merge pull request apache#11983 from ibzib/BEAM-10234
Browse files Browse the repository at this point in the history
[BEAM-10234] Fix error message for missing licenses.
  • Loading branch information
ibzib authored Jun 11, 2020
2 parents f33c85d + 5ae1057 commit f5b505a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sdks/python/container/license_scripts/pull_licenses_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def pull_from_url(dep, configs):
finally:
shutil.rmtree(cur_temp_dir)


if __name__ == "__main__":
os.makedirs(LICENSE_DIR)
no_licenses = []
Expand Down Expand Up @@ -144,8 +145,12 @@ def pull_from_url(dep, configs):
'and add entries to sdks/python/container/license_scripts/' \
'dep_urls_py.yaml.'
raise RuntimeError(
'Could not retrieve licences for packages [{license_list}] in '
'Could not retrieve licences for packages {license_list} in '
'Python{py_ver} environment. \n {how_to}'.format(
py_ver=py_ver, license_list=sorted(','.join(no_licenses)), how_to=how_to))
py_ver=py_ver,
license_list=sorted(no_licenses),
how_to=how_to))
else:
logging.info('Successfully pulled licenses for {n} dependencies'.format(n=len(dependencies)))
logging.info(
'Successfully pulled licenses for {n} dependencies'.format(
n=len(dependencies)))

0 comments on commit f5b505a

Please sign in to comment.