2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 12:41:39 +00:00

Print license install errors when provided

When the service gives errors installing keys,
relay them to the user.
This commit is contained in:
Jarrod Johnson 2019-07-22 11:21:31 -04:00
parent 00ce48b046
commit 514a121c15

View File

@ -70,7 +70,11 @@ def install_license(session, filename):
filename = os.path.abspath(filename)
instargs = {'filename': filename}
for res in session.create(resource, instargs):
pass # print(repr(res))
for node in res.get('databynode', []):
if 'error' in res['databynode'][node]:
sys.stderr.write('{0}: {1}\n'.format(
node, res['databynode'][node]['error']))
sys.exit(res['databynode'][node].get('errorcode', 1))
show_licenses(session)